Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^3: CarTalk Puzzler

by reasonablekeith (Deacon)
on Nov 18, 2005 at 15:41 UTC ( [id://509831]=note: print w/replies, xml ) Need Help??


in reply to Re^2: CarTalk Puzzler
in thread CarTalk Puzzler

  
print 0+sqrt!~/\./for 1..2e4
very cool lateral thinking.

cheers for the replies re the space thing. I never really give any thought to the parser. How do you pick this stuff up without delving into the internals? (which I don't think I'm ready for)

---
my name's not Keith, and I'm not reasonable.

Replies are listed 'Best First'.
Re^4: CarTalk Puzzler
by Perl Mouse (Chaplain) on Nov 18, 2005 at 15:52 UTC
    How do you pick this stuff up without delving into the internals?
    That's how most of the important lexers/parsers work: they find the next token in a greedy way. That's why in most languages white space is only needed to separate tokens if concatenating them causes a different (and unwanted) way of parsing.

    It's nothing specific to Perl, nor do you need to know anything about the internals.

    Perl --((8:>*

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://509831]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-19 01:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found