Re: Hamming minigolf post mortem
[email protected] (Juho Snellman)
| Newsgroups | perl.golf |
|---|---|
| Message-ID | <[email protected]> |
On Sat, Apr 19, 2003 at 04:02:38PM -0400, Keith C. Ivey wrote: > But why does 'print for 0 x6..~$~' work when 'print for > 0 x6..$~' doesn't? In the latter case $~ has never been used in string context (since it's never been used), so magical string auto-increment doesn't apply. That's why even something like '$~; print for 0 x6..$~' works. > I wouldn't have expected the first one > to work with or without 'for', since ~$~ doesn't contain any > [A-Za-z0-9]. It doesn't need to. perldoc perlop: : If the final value specified is not in the sequence that the magical : increment would produce, the sequence goes until the next value would : be longer than the final value specified. -- Juho Snellman