R
r.mariotti
Been doing perl since mid-90's. Just upgraded to the latest version
5.14.2 and many of my perl scripts are thowing errors like no
tomorrow.
I've spent several days trying to resolve the errors without much
success so I thought I would post here as many must have experienced
the same.
I DID research quite extensively with perldoc and google and tried
literally all the suggestions but here it goes anyway.
It appears that using the pragmas warning and strict the newest
version is requiring predefinition of variables prior to their use.
Here's a snippet of my code:
# Define pragmas
use warnings;
use strict;
# Define ALL needed variables & indecies
my $fn = '' unless defined($fn);
my $ln = '' unless defined($ln);
my $opt = '' unless defined($opt);
my $rr = 0 unless defined($rr);
my $x1 = '' unless defined($x1);
my $x2 = '' unless defined($x2);
my $x3 = '' unless defined($x3);
my $x4 = '' unless defined($x4);
Pls note that the '' chars above are two single quotes indicating a
NULL value just to initialize the variables.
The infamous error is
Global symbol "$fn" requires explicit package name
Oh the joy. Anyone care to contribute as it will be very, very
appreciated.
Thanks all
5.14.2 and many of my perl scripts are thowing errors like no
tomorrow.
I've spent several days trying to resolve the errors without much
success so I thought I would post here as many must have experienced
the same.
I DID research quite extensively with perldoc and google and tried
literally all the suggestions but here it goes anyway.
It appears that using the pragmas warning and strict the newest
version is requiring predefinition of variables prior to their use.
Here's a snippet of my code:
# Define pragmas
use warnings;
use strict;
# Define ALL needed variables & indecies
my $fn = '' unless defined($fn);
my $ln = '' unless defined($ln);
my $opt = '' unless defined($opt);
my $rr = 0 unless defined($rr);
my $x1 = '' unless defined($x1);
my $x2 = '' unless defined($x2);
my $x3 = '' unless defined($x3);
my $x4 = '' unless defined($x4);
Pls note that the '' chars above are two single quotes indicating a
NULL value just to initialize the variables.
The infamous error is
Global symbol "$fn" requires explicit package name
Oh the joy. Anyone care to contribute as it will be very, very
appreciated.
Thanks all