my code:
#!/usr/bin/perl -w
use strict;
my $info;
my $file;
opendir(DIR, "/etc/") or die "Can't open directory : $!\n";
my @list = readdir(DIR);
for $file(@list) {
next if ( -d $file );
$info = (stat($file))[7];
print "Filename: $file : $info\n";
}
closedir(DIR);
I am getting:
Use of uninitialized value in concatenation (.) at ./stat line 14.
Line 14 is the "print" line. I am not certain what gives. When I take this
same script and run it against a single file rather than something being
read within the for loop, it works. Once in the loop however, no dice.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]