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

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

Thread Previous | Thread Next
From:
Kjetil Torgrim Homme
Date:
May 29, 2003 16:08
Subject:
Re: [perl #22372] foreach variable referenced in format segfaults
Message ID:
1ry90pwf2r.fsf@vingodur.ifi.uio.no
(I already sent this once, <1rhe7dxz0i.fsf@vingodur.ifi.uio.no>, not
sure why it didn't show up?)

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.

Thread Previous | 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