I'm not able to run the code. It doesn't even compile when I remove all the unused use clauses.

Why do you turn warnings off? They would've told you

Variable "$client" will not stay shared at Op.pm line 59.

In Perl, nesting named subs doesn't make sense. Named subs exist in the namespace of the enclosing package, block scope doesn't influence them. It also means the closure is created around the $client variable from the first invocation of the outer sub.

But you should fix all the remaining problems, too.

Can't declare array dereference in "my" at Op.pm line 56, near "$respo +nsalter;" Global symbol "$target" requires explicit package name (did you forget + to declare "my $target"?) at Op.pm line 67. Global symbol "$strExcelFilename" requires explicit package name (did +you forget to declare "my $strExcelFilename"?) at Op.pm line 85. Global symbol "%header1" requires explicit package name (did you forge +t to declare "my %header1"?) at Op.pm line 87. Global symbol "@responsalter" requires explicit package name (did you +forget to declare "my @responsalter"?) at Op.pm line 94. Global symbol "@responsalter" requires explicit package name (did you +forget to declare "my @responsalter"?) at Op.pm line 98. Global symbol "$from_address" requires explicit package name (did you +forget to declare "my $from_address"?) at Op.pm line 112. Global symbol "$to_address" requires explicit package name (did you fo +rget to declare "my $to_address"?) at Op.pm line 113. Global symbol "$subject" requires explicit package name (did you forge +t to declare "my $subject"?) at Op.pm line 114. Global symbol "$my_file_zip" requires explicit package name (did you f +orget to declare "my $my_file_zip"?) at Op.pm line 121. Global symbol "$your_file_zip" requires explicit package name (did you + forget to declare "my $your_file_zip"?) at Op.pm line 122. Global symbol "$your_file_zip" requires explicit package name (did you + forget to declare "my $your_file_zip"?) at Op.pm line 124. Global symbol "$mail_host" requires explicit package name (did you for +get to declare "my $mail_host"?) at Op.pm line 126. Global symbol "$from_address" requires explicit package name (did you +forget to declare "my $from_address"?) at Op.pm line 126. Global symbol "$pass" requires explicit package name (did you forget t +o declare "my $pass"?) at Op.pm line 126. Execution of Op.pm aborted due to compilation errors.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

In reply to Re^3: Need to know the process to implement perl script into web application server. by choroba
in thread Need to know the process to implement perl script into web application server. by chandantul

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.