Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 examining the Monastery: (12)
As of 2015-07-07 20:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls