![]() |
|
No such thing as a small change | |
PerlMonks |
Re: why scalar(@array) is not numeric?by aufflick (Deacon) |
on Jul 17, 2009 at 00:37 UTC ( #780895=note: print w/replies, xml ) | Need Help?? |
As id:Fletch says, using comma to provide a list to print elegantly solves the problem. To make it clearer that it is purely a precedence issue though, you can fix your existing statement by making precedence explicit with brackets: print "number of files: " . ($size-2) . "\n";
In Section
Seekers of Perl Wisdom
|
|