in reply to Re: CarTalk Puzzler
in thread CarTalk Puzzler
print 0+sqrt!~/\./for 1..2e4
As a slight drift, how did I manage to get away without a space before the 'for'?Because you only need spaces if the concatenation of the two tokens creates a longer leading token. But in Perl, no token starts with '0f', hence perl knows '0' is a token, and 'for' another.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: CarTalk Puzzler
by reasonablekeith (Deacon) on Nov 18, 2005 at 15:41 UTC | |
by Perl Mouse (Chaplain) on Nov 18, 2005 at 15:52 UTC |