Here's how I'd do it:
#!/usr/bin/perl use warnings; use strict; my $largestsize = 0; my $size; my $file = "filelist"; open (FILE, "$file") or die $!; while (<FILE>) { chomp; if ( -e $_ ) { $size = (stat($_))[7]; if ($size > $largestsize) { $largestsize = $size; } } } print ("$largestsize \n");
In reply to Re: Unsuccessful and Uninitialized Value
by jpeg
in thread Unsuccessful and Uninitialized Value
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |