Unfortunately my client interpretes highly experimental by default as "Oh. So it's feasible". :-)
As a programmer it's your job to tell him otherwise.
If possible create an example that segfaults (for example try some fun with closures inside the block), and show that to your client ;-)
Precomputing the most inner block gives the same result.
Then you have to unroll one more level:
!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
my @A = ( "ab", "abcd", "f" );
my %H = (
'ab' => 0,
'abcd' => 1,
#'def' => 2,
);
my $re_inner = join( '|', @A);
my $re_outer = join '|', grep /$re_inner/gi, keys %H;
my @B = grep ( !/$re_outer/gi, @A );
print Dumper(\@B);
Disclaimer: I haven't actually understood what you try to achieve, maybe there's a better solution altogether. |