develooper Front page | perl.perl5.porters | Postings from January 2003

Re: [perl #19624] perl 5.8.0 threaded vs non-threaded discrepency

Thread Previous
From:
Dave Mitchell
Date:
January 1, 2003 07:03
Subject:
Re: [perl #19624] perl 5.8.0 threaded vs non-threaded discrepency
Message ID:
20030101150029.A12907@fdgroup.com
On Tue, Dec 31, 2002 at 03:51:39PM -0000, Daryl Habersetzer wrote:
> I've found a discrepancy in outputs from the following code:
> 
> #!/usr/local/bin/perl
> 
> my %hash = qw (
> a:b 1
> c:d 2
> e:f 3
> );
> 
> my $k;
> for $k (keys(%hash)) {
>      my $kk = eval '$hash{$k}';
>      print "$k -> $kk\n";
>      $k =~ tr/:/ /;
>      #$k =~ s/(.+)/$kk/; #this one causes a seg fault
> }
> print "\n";
> for $k (keys(%hash)) {
>      print "$k -> $hash{$k}\n";
> }
> exit;

Thanks for the report.
Both of these problems (the coredump and the hash keys beeing modified)
have been fixed by a recent patch to the development version of Perl
(patch #18319).

-- 
But Pity stayed his hand. "It's a pity I've run out of bullets",
he thought. - "Bored of the Rings"

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About