in reply to Functions in substitutions (s///) and Perl 5.8.
Off the top of my head, you might try introducing some interpolation to see if that would make a difference:
s/\[\[(\w+)\]\]/$helper->("$1")/eg;or maybe:
s/\[\[(\w+)\]\]/"@{[$helper->($1)]}"/eg;or even an explicit copy:
s/\[\[(\w+)\]\]/my $match = $1; $helper->($match)/eg;Functionally, these should be no different, but if this is an internal perl bug, these alternatives may take a different code path and might not trip over the bug... (If you're lucky!)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Functions in substitutions (s///) and Perl 5.8.
by teichman (Novice) on Oct 25, 2002 at 15:11 UTC |