in reply to Re: Unknown problem, throws "Useless use of privt var in void contxt"
in thread Unknown problem, throws "Useless use of privt var in void contxt"
Your explanation of => is not entirely accurate.
is equivalent toif ($month => 10) { ... }
The => operator does NOT wrap whatever appears on the left into a string. Instead, it allows any expression, but if a bareword is used, it turns the bareword into a string. Any other expression is left as-is, not even coerced into being a string. (Actually rolling a list into a hash will coerce the keys into strings unless the hash has some magic.)if ($month, 10) { ... }
--
[ e d @ h a l l e y . c c ]
In Section
Seekers of Perl Wisdom