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

Re: Re: Writing highly obfuscated code in Perl

by strat (Canon)
on Feb 27, 2002 at 14:29 UTC ( #147906=note: print w/replies, xml ) Need Help??


in reply to Re: Writing highly obfuscated code in Perl
in thread Writing highly obfuscated code in Perl

Use strange delimiters for patternmatches and ee (or at least e)for substitutions, e.g. s?one?$another?gee

Use ~~ instead of scalar

(Thanks to Damian Conway for his talk "Extreme Perl" at the Perl-Workshop; the ideas abouve are from him). Use y instead of tr

and so on and so on...

perl -le "~~s--*l-e=>y˛*(min˛*(cme(˛=>s)[^\w]))g=>print"

Best regards,
perl -le "s==*F=e=>y~\*martinF~stronat~=>s~[^\w]~~g=>chop,print"

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://147906]
help
Chatterbox?
[Corion]: You could even do the calculation directly - my $duration = $H * 3600+ $M*60 + $S; strftime '%H:%M:%S', timelocal($duratio n)
[Corion]: (and that strftime call is largely superfluous too, converting back to H:M:S isn't hard either)
[gnosti]: Corion: Thanks. Going to seconds, then back to H:M:S using strftime looks good.
[gnosti]: True, it's easy to go both ways ;-)
[marioroy]: kcott found the link.

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2017-08-18 09:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (297 votes). Check out past polls.

    Notices?