Re: Hamming minigolf post mortem

[email protected] (Juho Snellman)
Newsgroups 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.