in reply to Having scalars handled as regexs inside a substitution
sub findandreplace { my ($string, $find, $replace)=@_; eval { $string =~ s/$find/$replace/; } die "$@" if $@; $string; }
--ZZamboni
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: Having scalars handled as regexs inside a substitution
by DrManhattan (Chaplain) on May 20, 2000 at 19:48 UTC | |
by ZZamboni (Curate) on May 21, 2000 at 00:01 UTC |