On Sun, May 22, 2011 at 06:13:08PM +0100, Ian Jackson wrote:
> Package: perl
> Version: 5.10.1-17
> 
> Observe the transcript below.  You'll see that the other match against
> $thing seems to somehow pollute the use of $& in the assignment to
> Num, but only in the simple case.

It looks like the $& fetch magic gets called too late. Evaluating
it earlier, for instance with stringification, fixes things.

  % perl -E '$_="not ok"; for my $m ( (/ok/ and $&), /$_/) { say $m; last }'
  not ok
  %  perl -E '$_="not ok"; for my $m ( (/ok/ and "$&"), /$_/) { say $m; last }'
  ok

Still happens with 5.14.0. I'll forward this upstream.
-- 
Niko Tyni   [email protected]



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to