Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

One-liner japh

by ambrus (Abbot)
on Oct 31, 2003 at 08:12 UTC ( #303508=obfuscated: print w/replies, xml ) Need Help??

This one-liner combines the power of bash and perl. It's not suitable as a signature however, as it's not quite portable.

eval perl{\ \''-lne/"(.*','.*)".(...)/x&&%{uc$2}&&print$1'\',\"doc,faq +1\|\"}

Update: you have to run this line in bash, and it will run perl, in case you haven't figured it out.

Update: At least four other people has found the same obfu idea. see Just Another JAPH, Opere Citato Japh, JAPF and Perl FAQ.

Update 2008 feb 10: The release of perl 5.10.0 has broken this japh. If you have a perl 5.8.8 or earlier version, use it by changing PATH.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: obfuscated [id://303508]
Approved by dbwiz
help
Chatterbox?
[tye]: well, you certainly don't see strack traces with all of the values removed from Perl.
[thezip]: Howdy RonW. Not in *my* logfiles you won't!
[tye]: and I never claimed anything about 100% on either side.
[RonW]: Presumably because the coders didn't realize that die and warn will append line number and file when the message strings doesn'r end with a line terminator
[tye]: And these are popular and not new python projects.
[thezip]: I had a user complain that they didn't receive an email from one of my processes. I went to the logfile and reproduced the entire contents of the email they would have received. Not my problem.
[tye]: How the heck does a web framework get popular when an unexpected exception gets logged as just "Exception" w/ no details?
[RonW]: There have been times when some one has modified my Perl code and decided to "clean up" my error/warning messages for me by adding line terminators
[RonW]: Because the coders using them like them despite the lack of useful error/warning messages

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (12)
As of 2017-09-21 20:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (252 votes). Check out past polls.

    Notices?