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

Re: Efficient algorithm needed to split Set::IntSpan objects

by jwkrahn (Abbot)
on Sep 23, 2009 at 13:55 UTC ( [id://796972]=note: print w/replies, xml ) Need Help??


in reply to Efficient algorithm needed to split Set::IntSpan objects

$ perl -le' my $x = "--XXXXXXXXX---"; my $y = "----XXXX------"; my $z = "------XXXXX---"; tr/-X/01/ for $x, $y, $z; print for $x, $y, $z; my $m = 0 x length $x; $m =~ s/(.)/ $1 + substr $_, $-[0], 1 /eg for $x, $y, $z; print for "", $m; ' 00111111111000 00001111000000 00000011111000 00112233222000

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-25 19:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found