tcf03 has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use strict; use warnings; # my @CS_CHECKS = ( '00012345', 'D123470', '0000123450', '0000023456', ' +50000123990' ); my @B_CHECKS = ( '1234', '12345', '123990', '12399' ); my %seen; for my $cn ( @CS_CHECKS ) { for my $bn ( @B_CHECKS ) { if ( $cn =~ /^(0|5|6)0+\Q$bn\E$/ ) { print "$bn = $cn\n"; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Merged list with regex matches
by ikegami (Patriarch) on Sep 04, 2007 at 15:51 UTC | |
by tcf03 (Deacon) on Sep 04, 2007 at 16:35 UTC | |
|
Re: Merged list with regex matches
by mr_mischief (Monsignor) on Sep 04, 2007 at 16:24 UTC | |
|
Re: Merged list with regex matches
by Sidhekin (Priest) on Sep 04, 2007 at 15:49 UTC | |
|
Re: Merged list with regex matches
by Fletch (Bishop) on Sep 04, 2007 at 15:49 UTC | |
|
Re: Merged list with regex matches
by dorko (Prior) on Sep 04, 2007 at 15:49 UTC | |
|
Re: Merged list with regex matches
by bart (Canon) on Sep 05, 2007 at 11:20 UTC |