Just another Perl shrine | |
PerlMonks |
Re^2: Useless use of private variable in void contextby AnomalousMonk (Archbishop) |
on Jun 22, 2010 at 19:17 UTC ( [id://845947]=note: print w/replies, xml ) | Need Help?? |
But Khen1950fx's code has $tiu, $min && $tiu < $max as an if statement condition expression in two places. (I don't understand why this form is used in place of $tiu => $min && $tiu < $max of the OP code; am I missing something?) Unless evaluation of $tiu has some side-effect (e.g., if it was a tied scalar – which it doesn't seem to be: as far as I can see, it's always a humble lexical), its evaluation is still useless and the 'useless use of ...' warning will still be generated.
In Section
Seekers of Perl Wisdom
|
|