Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Efficient selection mechanism?

by ikegami (Patriarch)
on Jan 14, 2014 at 17:13 UTC ( [id://1070577]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $AoA = pack 'C*', map @$_, @AoA;
    
    ...
    my $pat = '[^'.( join '', map quotemeta, pack 'C*', @$omit ).']{4}';
    my $re = qr/\G(?:.{4})*?($pat)/s;
    my @matches = map [ unpack 'C*', $_ ], $AoA =~ /$re/g;
    
  2. or download this
    my $AoA = pack '(C4S)*', map { @{ $AoA[$_] }, $_ } 0..$#AoA;
    
    ...
    my $pat = '[^'.( join '', map quotemeta, pack 'C*', @$omit ).']{4}';
    my $re = qr/\G(?:.{6})*?$pat(..)/s;
    my @matches = @AoA[ map unpack 'S', $AoA =~ /$re/g ];
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2024-04-19 16:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found