By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,742 Members | 1,227 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,742 IT Pros & Developers. It's quick & easy.

Can't use string ("1") as an ARRAY ref while "strict refs" in use at (re_eval 96) lin

P: 1
My Code Snippet.

Expand|Select|Wrap|Line Numbers
  1. #!perl -w
  2.  
  3. #############################################################################
  4. #
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11. use SOAP::Lite;
  12. use POSIX qw( strftime );
  13. use warnings;
  14. my $data_date = strftime("[%m/%d/%Y %H:%M:%S]", localtime);
  15. my %InputParms;
  16. my $temp_elements;
  17. my $response = 1;
  18.  
  19.     ##############################################
  20.     #
  21.     # Step 1 - Email the reminder
  22.     #
  23.     ##############################################
  24.  
  25.     my $soap1 = SOAP::Lite
  26.         -> uri('urn:MsgDeliveryService')
  27.         -> proxy("http://$ENV{MSGDEL_WS_HOST}/MsgDeliveryService/services/MsgDeliveryService");
  28.  
  29.     my $subj = "Activity Sheet Daily Report Notice";
  30.  
  31.     my $recp = "abc\@gmail.com";
  32.     if( $ENV{CTRM_ENV} ne "PRD" ) {
  33.         $subj = "$ENV{CTRM_ENV}: TEST : $subj";
  34.  
  35.         $recp = "abc\@gmail.com";
  36.     }
  37.  
  38.     %InputParms = (
  39.         FROM      => "abc\@gmail.com",
  40.         SUBJECT   => "$subj",
  41.         PAYLOAD   => "The Activity Sheet Daily Report is available",
  42.         DLVR_MTHD => "SMTP",
  43.         RECIPIENT => "$recp"
  44.         );
  45.  
  46.     $temp_elements = SOAP::Data
  47.         -> value( SOAP::Data
  48.         -> type('map', \%InputParms)
  49.         );
  50.  
  51.     $response = $soap1->deliverMsg($temp_elements);
  52.  
  53. exit ($response?0:1);
Aug 24 '17 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.