[email]tamashee[/email] (Tamas) wrote in message news:<a10ea509.0308180050.62193d2bposting.google. com>...
> Hi,
> I am getting two different results on testing a file size. Any explanations?
>
> Preamble:
> use constant SIZE_LIMIT => 1000;
> my $fl = "/dir/oneBigFile";
>
> Scenario 1:
> my $size = -s $fl;
> if ($size > SIZE_LIMIT) {
> print "Got big file\n";
> }
>
> Scenario 2:
> if (-s $fl > SIZE_LIMIT) {
> print "Got big file\n";
> }
>
>
> Why does prog snippet (1) works fine but not (2), if $fl is > 1000 bytes.
> Thanks in advance,
Did you type the code snippet in your message, or copy/paste from the
actual program? I get the same results from the *posted* code for both
scenarios.