in reply to Unsuccessful and Uninitialized Value

Some crude debugging would help. Check to see if the file exists before you stat it, and establish a default value: The uninitialized warning is generated because $new_max is not a number yet.

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");
--
jpg