Hello all.

I'm trying to compare the size of two files in a script. I know I can open them, feed 
each into an array, and compare the number of lines, but that seems silly and 
inefficient. I tried using File::stat in the following manner:

$file1 = stat($firstFile);
$file2 = stat($secondFile);

if ($file1->size > $file2->size)
{
        blahblahblah;
}

Everytime the script gets to these lines, the stat function fails, and the program 
exits. Am I doing somthing wrong? I'm using perl 5.8.0 on Redhat 8.0.

Thanks for the help,
Brian

Reply via email to