in reply to perl code not working after moved new host with latest perl version
Four things:
1. Are you sure the ENV variables are set properly on the new machine? What do you get when you run the following in terminal for both machines?
echo REQUEST_METHOD: $REQUEST_METHOD echo CONTENT_LENGTH: $CONTENT_LENGTH echo QUERY_STRING: $QUERY_STRING
2, On which line is the uninitialized value reported?
3. Put the following at the top of your script below the shebang:
use strict; use warnings;
4. Now what warnings/errors do you see? (Be sure to declare your variables w/ my)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: perl code not working after moved new host with latest perl version
by dpprabhuindia (Initiate) on Mar 28, 2015 at 08:47 UTC | |
sorry I forgot to specify what is error I am facing in RHEL6 with perl version Commands I ran before run from shell promp Here is the error when I run with warning
| [reply] [d/l] [select] |
by dpprabhuindia (Initiate) on Mar 28, 2015 at 08:49 UTC | |
sorry I forgot to specify what is error I am facing in RHEL6 with perl version Commands I ran before run from shell promp $ export REQUEST_METHOD=GET $ export QUERY_STRING="sid=xxxxdb&period=2592000&top=10" $ perl -W chktr.pl Here is the error when I run with warning
| [reply] [d/l] |
by dpprabhuindia (Initiate) on Mar 29, 2015 at 11:27 UTC | |
I managed to delete invalid data from RRD output using splice
for my $index (reverse 0..$#f) { if ( $f$index =~ /nan/ ) { splice(@f, $index, 1, ()); } }
Thanks to all Perl Monks for your support and your time. I really enjoyed way perl works dpprabhuindia | [reply] |