Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: Re: Re: Can you guess the result? Is it a bug?by dga (Hermit) |
on Jul 31, 2003 at 22:06 UTC ( [id://279809]=note: print w/replies, xml ) | Need Help?? |
The warning is just trying to help you out so that you don't have an if that evaluates to a constant boolean value which these all do. Consider:
In the first is checks to see if $val is 3 and in the second it sets $val to be 3 and then checks $val for truth which in this case is always true. So for normal situations that line should just be:
Which would have the same effect in my little sample program.
In Section
Seekers of Perl Wisdom
|
|