Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^4: Perl Golf 101

by chargrill (Parson)
on May 31, 2006 at 00:10 UTC ( #552662=note: print w/replies, xml ) Need Help??


in reply to Re^3: Perl Golf 101
in thread Perl Golf 101

...orthogonal to golf

Indeed - I dare anyone to run perlcritic* against any golfed code :-) (Which is why I posted the big notice about not letting any of these "techniques" make it into production code ;)

I've gotten in the habit of running perlcritic against pretty much all of my production level code these days, and taking the output with a grain of salt. My .perlcriticrc does contain quite a few things from PBP that I don't particularly agree with...

* For those unfamiliar with it, perlcritic is a commandline utility that (by default) critiques your code against a set of rules as outlined by Perl Best Practices.



--chargrill
$,=42;for(34,0,-3,9,-11,11,-17,7,-5){$*.=pack'c'=>$,+=$_}for(reverse s +plit//=>$* ){$%++?$ %%2?push@C,$_,$":push@c,$_,$":(push@C,$_,$")&&push@c,$"}$C[$# +C]=$/;($#C >$#c)?($ c=\@C)&&($ C=\@c):($ c=\@c)&&($C=\@C);$%=$|;for(@$c){print$_^ +$$C[$%++]}

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2019-11-22 08:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (110 votes). Check out past polls.

    Notices?