Amit Saxena wrote:
Why don't use perl "s" operator with "e" option ?
$str =~ s/([^ ]+)/$hash{\1}/ge
You don't need the /e option to interpolate a variable in a double
quoted string and you should use $1 instead of \1 inside a double quoted
string:
$str =~ s/([^ ]+)/$hash{$1}/g
John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order. -- Larry Wall
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/