Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Einstein was a wise man

by dze27 (Pilgrim)
on Mar 08, 2001 at 02:34 UTC ( #62850=note: print w/replies, xml ) Need Help??


in reply to Einstein was a wise man

Well, this is the first time I've figured out obfuscated code (so maybe it's not that obfuscated?!).

Spoiler follows: @q sets up anonymous arrays containing numbers which each represent a different letter. @w is an array for which each number represents a different word (there are lots of duplicate words in the phrase). Then the foreach loops iterate over each word, and then each letter is decoded by splitting a text string into an array. For instance, the first (0-indexed) item in the text string, t, corresponds to 0 in the @q array. A string is then built up for each word and then each word is added to an array with "push". Finally the result is output.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2021-10-16 04:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (69 votes). Check out past polls.

    Notices?