in reply to Updating database question
And unrelated to your DBI question, but you might could use a data structure of regex objects rather than that frelling huge if monstrosity.
use Tie::RefHash; tie my %m, "Tie::RefHash"; %m = ( qr/abc/ => "ABC", qr/def/ => "XYZ", ); $str = "def"; for my $r ( keys %m ) { if( $str =~ $r ) { $str = $m{$r}; last; } } print $str, "\n"
--
We're looking for people in ATL
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Updating database question
by jhourcle (Prior) on Jun 30, 2005 at 20:41 UTC | |
|
Re^2: Updating database question
by curtisb (Monk) on Jun 30, 2005 at 18:46 UTC | |
by Fletch (Bishop) on Jun 30, 2005 at 19:29 UTC |