P is for Practical | |
PerlMonks |
Re: Overloading for List Contextby webfiend (Vicar) |
on May 31, 2002 at 16:29 UTC ( [id://170757]=note: print w/replies, xml ) | Need Help?? |
I can make it work with while. I'm just a monkeyboy, so I have no idea why it works. Anyways:
Or, putting the while in the same style as the rest of the program:
Would somebody smart like to explain why while works, but for doesn't? Update: Drank some more coffee, realized that wasn't really the question. Back to the drawing board ... Update: Okay, I am stumped (which isn't a major news item itself ;-) ). I have found no way to convince LuckyDraw that I wantarray. List assignment and while both come up in a scalar context. Where is the oddity coming from? Overload? The iterator <> operator? Does perl have a hangover today? "All you need is ignorance and confidence; then success is sure."-- Mark Twain
In Section
Seekers of Perl Wisdom
|
|