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.
If this is a real bug it probably wants to go upstream, but I thought it might be sensible to ask you as the Debian maintainer to sanity check. This bug seems to appear on lenny too (5.10.0-19lenny3). Thanks, Ian. $ cat perl-bug.pl use strict; use warnings; use Data::Dumper; my $thing= '1-word'; print STDERR Dumper( { Num => ($thing =~ m/^\d+/ ? $& : die) }); # Works, Num => "1" print STDERR Dumper( { Num => ($thing =~ m/^\d+/ ? $& : die), Word => !!($thing =~ m/word/) }); # Broken, Num => "word" print STDERR Dumper( { Num => ($thing =~ m/^\d+/ ? "$&" : die), Word => !!($thing =~ m/word/) }); # Works, Num => "1" print STDERR Dumper( { Num => ($thing =~ m/^\d+/ ? int $& : die), Word => !!($thing =~ m/word/) }); # Works, Num => 1 $ perl -w perl-bug.pl $VAR1 = { 'Num' => '1' }; $VAR1 = { 'Num' => 'word', 'Word' => 1 }; $VAR1 = { 'Num' => '1', 'Word' => 1 }; $VAR1 = { 'Num' => 1, 'Word' => 1 }; $ -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org