Perl-Sensitive Sunglasses | |
PerlMonks |
Re^5: unless versus if ( ! ) inside a subroutineby almut (Canon) |
on Jan 16, 2008 at 15:11 UTC ( [id://662686]=note: print w/replies, xml ) | Need Help?? |
Sure, but in those cases, constants are being tested in the conditional, which allows the compiler to make optimisations. In the OP's example, though, $v is a regular (mutable) scalar variable, which could change its value at runtime (after the compiler has done its work)...
In Section
Seekers of Perl Wisdom
|
|