Beefy Boxes and Bandwidth Generously Provided by pair Networks Russ
laziness, impatience, and hubris
 
PerlMonks  

Re: Trouble with Transliterate Function

by jwkrahn (Monsignor)
on Aug 29, 2013 at 21:28 UTC ( #1051512=note: print w/ replies, xml ) Need Help??


in reply to Trouble with Transliterate Function

This appears to work correctly:

my @ranges = [ 0 ]; while ( <INTERVAL> ) { my ( undef, $start, $end ) = split; push @{ $ranges[ -1 ] }, $start - 1; push @ranges, [ $end ]; } push @{ $ranges[ -1 ] }, length $mask; for my $range ( @ranges ) { my ( $start, $end ) = @$range; next if $start == $end; substr( $mask, $start, $end - $start ) =~ tr//N/c; } print "$mask\n";


Comment on Re: Trouble with Transliterate Function
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2014-04-23 22:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (556 votes), past polls