We don't bite newbies here... much | |
PerlMonks |
Re^3: no expected 'Useless use of a constant in void context' warning for expression in return statementby LanX (Saint) |
on Dec 15, 2012 at 05:35 UTC ( [id://1008937]=note: print w/replies, xml ) | Need Help?? |
I meant the "returned expression" not the "return statement"!
it's effectively
so no warning
UPDATE: maybe the following is clearer,
as you can see the range-op transforms to flip-flop-op in scalar context. So we are not returning a list but an expression which is evaluated according to the callers context.
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|