We are currently contemplating moving from AIX 5.2 to 5.3. The following example perl script works fine in 5.2, both has a script and compiled. In AIX 5.3 it works as a script, but gives "Can't use an undefined value as filehandle reference" when it is compiled. If I comment out the getopts statement, and compile it, it works fine. What am I missing?
#!/usr/bin/perl
use Getopt::Std;
getopts('p');
open(MBLIST,"ls -1 | ");
while(<MBLIST>)
{
print $_;
}
close(MBLIST);
I am not an expert perl person by any stretch of the imagination. Any help will be appreciated.
#!/usr/bin/perl
use Getopt::Std;
getopts('p');
open(MBLIST,"ls -1 | ");
while(<MBLIST>)
{
print $_;
}
close(MBLIST);
I am not an expert perl person by any stretch of the imagination. Any help will be appreciated.