Re: Hamming minigolf post mortem
Juho Snellman <[email protected]>
| Newsgroups | gmane.comp.lang.perl.golf |
|---|---|
| Message-ID | <[email protected]> |
On Sat, Apr 19, 2003 at 09:41:29PM +0200, Terje Kristensen wrote: > the fact that "print 0 x6..$~" works didnt even cross my mind since i knew > that "print for 0 x6..$~" didnt work. can anyone explain this to me ? :) When ".." is used in the argument list for "for", it's optimized to not generate a list and then loop over the items. Instead one item is generated, the body run, then the second item generate, etc. This apparently only works when both arguments for ".." are valid numbers *or* both of them are string literals. -- Juho Snellman