Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Hello World!

by spacewarp (Pilgrim)
on Feb 15, 2002 at 21:01 UTC ( #145765=obfuscated: print w/ replies, xml ) Need Help??

Not really sure if this should be listed as an obfu or a CUFP, as it really does have qualities of both. On the one hand, it's sorta kinda unreadable, and certainly not what you'd expect a "Hello World" program to be like. On the other, it demonstrates perl's usefulness and power when dealing with regexps and alternate data sources.

I had this idea when I first started out in perl, but hit too many snags at that time. It's only just now, when I was cleaning out my fileshare, that I found and finished it.
#!/usr/bin/perl open(FILE,"$0"); while (<FILE>) { print if $_ =~ s/[^H]*(H)[^e]*(e)[^ll]*(ll)[^o]*(o)[^ + ]*( )[^W]*(W)[^o]*(o)[^r]*(r)[^l]*(l)[^d]*(d).*/$1$2$3$4$5$6$7$8$9$1 +0/; } close(FILE);

Spacewarp

DISCLAIMER:
Use of this advanced computing technology does not imply an endorsement
of Western industrial civilization.

Comment on Hello World!
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: obfuscated [id://145765]
Approved by root
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: (13)
As of 2014-12-26 06:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (167 votes), past polls