|
|
| Perl Monk, Perl Meditation | |
| PerlMonks |
Re^2: Why/how are these different?by perl-diddler (Friar) |
| on Jan 31, 2013 at 04:40 UTC ( #1016204=note: print w/ replies, xml ) | Need Help?? |
|
Wow...(warnings...duh!)....(doi!)) I didn't know they were different like that. How perverse! Too bad they didn't limit it to 'foreach' and created the confusion. I can't think of any other places where this could arise, off hand, but are there? I noted that if I put parens around the args of the 'for', as in the prefix'd form, I get errors. Hmmm...So even when you are clearly trying to use a postfix form, it throws an error instead of allowing it (though I understand why). I just can't figure out why it would have been designed that way. And to think I stayed away from 'foreach' specifically because many books recommend doing so because it uses more memory (and I'm working with large arrays)...
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||