Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

(jeffa) Re: Efficiency in maintenance coding...

by jeffa (Bishop)
on Mar 09, 2003 at 16:20 UTC ( #241574=note: print w/replies, xml ) Need Help??


in reply to Efficiency in maintenance coding...

... if one is good enough at one-liners, drop the maintenance and go for free-thought poetry:
perl -lane 's/\W//g,$h{lc$_}++for@F}{print"$_ => $h{$_}"for keys%h' fi +le
:P

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

Replies are listed 'Best First'.
Re^2: Efficiency in maintenance coding...
by Aristotle (Chancellor) on Mar 09, 2003 at 17:22 UTC
    perl -nle'$h{+lc}++for/(\w+)/g}{print"$a => $b"while+($a,$b)=each%h' f +ile
    :-)

    Makeshifts last the longest.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://241574]
help
Chatterbox?
and the leaves swirl about...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2017-11-25 02:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (355 votes). Check out past polls.

    Notices?