Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Problems? Is your data what you think it is?
 
PerlMonks  

(zdog) Re: Cheap obfu: or is it?

by zdog (Priest)
on Jun 23, 2002 at 18:24 UTC ( #176622=note: print w/ replies, xml ) Need Help??


in reply to Cheap obfu: or is it?

That's a pretty cute trick. Sorta reminds me of "Things are not what they seem like.".

The key here is that the second assignment doesn't really end until the 6th line from the top. So the string 'cut' is assigned to $,.

For the record: I did not guess the output before I ran the script. :-)

Good stuff.

Zenon Zabinski | zdog | zdog@perlmonk.org


Comment on (zdog) Re: Cheap obfu: or is it?
Select or Download Code
Re: (zdog) Re: Cheap obfu: or is it?
by mt2k (Hermit) on Jun 23, 2002 at 19:36 UTC
    zdog++ for being able to find the node I could not come up with. Things are not what they seem like. is the node I based it on. When I saw that node, I kind of thought "yeah, that second line with the POD is cool, but a 'cut' would look much better." Then I remembered the whole thing of barewords being "allowed" in assignments.

    So I built upon that and the reason you never see the output of print "Just Another Perl Hacker"; is because the actual POD doesn't start until the second occurence of '=cut', since the first is really an assignment to a variable! :)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (11)
As of 2014-04-16 19:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (433 votes), past polls