Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: your obfuscation magic!

by temporal (Pilgrim)
on Apr 24, 2012 at 18:54 UTC ( [id://966927]=note: print w/replies, xml ) Need Help??


in reply to your obfuscation magic!

I had no idea you could replace regex delimiters with... whatever! Can't wait to make my one-liners even more annoyingly obfuscated =P

Replies are listed 'Best First'.
Re^2: your obfuscation magic!
by tobyink (Canon) on Apr 24, 2012 at 21:00 UTC

    Beware that some delimiters have special meanings. e.g. m/$foo/i interpolates $foo whereas m'$foo'i does not.

    Regular expressions are not the only delimiters that can be replaced with whatever. qq(), q(), qx() and qw() work similarly. For example, the following assigns a string consisting of a single space character to $foo:

    my $foo = q q q;
    perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-04-20 06:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found