Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: PPGA - Prolog-Perl Golf Association: Run-length encoding (take 2)

by MeowChow (Vicar)
on Jul 04, 2001 at 10:55 UTC ( [id://93805]=note: print w/replies, xml ) Need Help??


in reply to PPGA - Prolog-Perl Golf Association: Run-length encoding

Make that 53 (and strict, to boot) ... ;-)
sub rle { my$c;map{shift;$c++;$_[0]ne$_?("$_*$c",$c=0)[0]:()}@_ }
update: err.. 51
sub rle { my$c;map{shift;$c++;$_[0]ne$_?"$_*$c"|($c=''):()}@_ }
   MeowChow                                   
               s aamecha.s a..a\u$&owag.print

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2024-04-19 03:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found