in reply to Re^3: Array or Hash problem!
in thread Array or Hash problem!
#!/usr/bin/perl -w my @code_array = qw(7772344 2233421 TMW2222987 TMA2222333 TMW9999988 A +MQ8873332 AMQ1111877); #the 2222987 value will be coming from the db query if ( "@code_array" =~ /(^|\s|[[:alpha:]]{0,3})2222987(\s|$)/ ) { print "Match!! \n"; } else { print "No Match \n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Array or Hash problem!
by youlose (Scribe) on Mar 04, 2010 at 19:28 UTC |