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

Re2: Block Search

by blakem (Monsignor)
on Oct 04, 2002 at 21:22 UTC ( [id://202907]=note: print w/replies, xml ) Need Help??


in reply to Re: Block Search
in thread Block Search

fore! 136 chars
#!/usr/bin/perl -wT use strict; my $s1 = 'abbbcddddfegrgrgddeeeeedd'; # 1 2 3 4 5 6 #2345678901234567890123456789012345678901234567890123456789012345678 print$s1.$/x2;push(@;,[$+[0]-$+[1],"-"x($+[1]-1).$&."-"x(length($s1) -$+[0])])while$s1=~/(.)\1*/g;print$$_[1].$/for sort{$$b[0]-$$a[0]}@;

-Blake

Replies are listed 'Best First'.
Re: Re2: Block Search
by meetraz (Hermit) on Oct 04, 2002 at 21:44 UTC
    wow! ++blakem ... Can you break it down for me?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-03-28 17:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found