Hi Perl monks,

I am new bee to perl, I am struck with issue where the code was working perfect until I upgraded the perl version from 5.14.4 to 5.22.3 on cygwin platform. The same script working fine on the other server with perl 5.14.4. Even on perl 5.22.4 strangely the code works fine for couple of runs and fails after . I tried debugging, but I am not sure where its going wrong, please help me understating why the issue arised after the upgrade.

Below is the code reference, I have posted only part of the code here as its very big script.

#!/usr/bin/perl # $Header: # my %CONFIG_PARAMS; my $mapattach; # grab the map attach from the conf file while (my ($key , $value) = each(%CONFIG_PARAMS)) { if ($file =~ /$key/) { $mapattach = $value; } } # is there a map attach for this file? unless (defined $mapattach) { #Println "Could not find the map attachment for $file, please c +heck the configuration file and try again"; Println "WARN : Ignoring $file, not found in the config file"; } # construct aicommand $aicommand = qq{"$ENV{'OT_DIR'}/bin/inittrans" -cs $ENV{'OT_QUEUE +ID'} -at $attach -DINPUT_FILE=$cpfile -DMESSAGE=$mapattach -DBYPASS=O +TINOByp.att};

In the above code, "$mapattach" variable is not piking up the value, hence throwing the error "Ignoring $file, not found in the config file";" even when file is there in the CONFIG_PARMS file .kindly help me how can I fix this issue.

thanks & Regards

Sri


In reply to Code Issue after Upgrading the perl from 5.14.4 to 5.22.3 by Srinath

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.