|
|
| Perl Monk, Perl Meditation | |
| PerlMonks |
Puzzled over 'my'by myomancer (Novice) |
| on Oct 23, 2003 at 12:42 UTC ( #301561=perlquestion: print w/ replies, xml ) | Need Help?? |
|
myomancer has asked for the
wisdom of the Perl Monks concerning the following question:
I was trying to use grep in a scalar context, and thought this would work:
But this just returned "Some String" rather than a number. If I remove 'my', the code works as I expected. This has upset my mental picture of what 'my' actually does. Please can anybody point me at a good resource to explain the subtleties if 'my'? Many thanks, Myomancer
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||