sub translate { my $str = shift; my @chunks = split /<(\d+)>/ => $str; my @results; while (@chunks) { my ($number, $string) = splice @chunks => 0, 2; if ($number == 30) { ... } else { push @results => '@(' . $hash {$number} . ')', qq {"$string"}; } } join ";" => @results; }
Abigail
In reply to Re: Smart Search and Replacement with RegEx
by Abigail-II
in thread Smart Search and Replacement with RegEx
by shelob101
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |