Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Trouble with Transliterate Function

by jwkrahn (Abbot)
on Aug 29, 2013 at 21:28 UTC ( [id://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";

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-23 23:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found