in reply to Re: Replace a hash key if it matches a regex
in thread Replace a hash key if it matches a regex
is bad?my $foo = $1 if $_ =~ /regex/;
By the way, thanks for pointing out that I was not using $match. Late night.if ( $_ =~ /regex/ ) { my $foo = $1; $db_results->{$foo} = delete $db_results->{$_}; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Replace a hash key if it matches a regex
by choroba (Cardinal) on Sep 13, 2013 at 10:14 UTC | |
by walkingthecow (Friar) on Sep 14, 2013 at 03:56 UTC | |
|
Re^3: Replace a hash key if it matches a regex
by AnomalousMonk (Archbishop) on Sep 13, 2013 at 10:15 UTC |