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

Re: [perl #22372] AutoReply: foreach variable referenced in format segfaults

Thread Next
From:
Kjetil Torgrim Homme
Date:
May 29, 2003 16:06
Subject:
Re: [perl #22372] AutoReply: foreach variable referenced in format segfaults
Message ID:
1rhe7dxz0i.fsf@vingodur.ifi.uio.no
>   this script will dump core on both Solaris and Linux.  it works
>   fine in versions prior to 5.8.0.
>   
>   format STDOUT =
>   ^<<<<<<<<<<<<<<~~
>   $el
<ends>

clearly perlbug doesn't handle reports with solitary periods ...
let's try again.  this crashes:

format STDOUT =
^<<<<<<<<<<<<<<~~
$el
.

%hash = ("k" => "v");
for $el (keys %hash) {
    write;
}


this works:

format STDOUT =
^<<<<<<<<<<<<<<~~
$el
.

%hash = ("k" => "v");
for $e (keys %hash) {
    $el = $e;
    write;
}

-- 
Kjetil T.			|  read and make up your own mind
				|  http://www.cactus48.com/truth.html

Thread Next


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