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

Re: [perl #21316] Bus error from C<sub $a>

Thread Previous
Dave Mitchell
February 20, 2003 06:07
Re: [perl #21316] Bus error from C<sub $a>
Message ID:
On Thu, Feb 20, 2003 at 10:52:47AM -0000, Robin Barker wrote:
> This short piece of code
> 	perl -e 'sub { sub $a; open my $f; die; }'
> produces
> 	Bus error
> If you change anything 'sub', 'open', 'my' or 'die'
> you get a syntax error (and sometimes a bus error).

it gives the following in bleedperl:

$ ./perl -e 'sub { sub $a; open my $f; die; }'
Illegal declaration of anonymous subroutine at -e line 1.

IIRC correctly, this was fixed by the patch that handled "sub;".

"You're so sadly neglected, and often ignored.
A poor second to Belgium, When going abroad."
Monty Python - "Finland"

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About