[.courtesy cc of this posting sent to cited author via email]
Yes, this is a bug or two. I've forwarded it to perlbug@perl.com
for eventual inclusion in http://www.perl.com/perl/bugs/
1) It does cause a core dump.
2) The @_ variable isn't mentioned in perlvar
3) Somewhere it's been written that mucking with @_ is a bad
idea, but I can't find the reference.
--tom
In comp.lang.perl.misc, jpn@genrad.com (John P. Nelson) writes:
:The following script consistantly causes perl5.001m to dump core on a
:variety of platforms. The exact behavior is a little different
:on different platforms, though. If the script works, it should print
:10 lines and then exit: it seems to die consistantly after printing
:3 lines.
:
:#! /usr/bin/perl
:
:for (1..10) {
: print "Trial $_\n";
: &foo("a", "b", "c");
:}
:
:sub foo {
: local(@array) = @_;
: local(@_);
:
: @_ = @array;
:}
--
Tom Christiansen Perl Consultant, Gamer, Hiker tchrist@mox.perl.com
The notion of a "record" is an obsolete remnant of the days of the
80-column card.
--Dennis M. Ritchie
Yes, this is a bug or two. I've forwarded it to perlbug@perl.com
for eventual inclusion in http://www.perl.com/perl/bugs/
1) It does cause a core dump.
2) The @_ variable isn't mentioned in perlvar
3) Somewhere it's been written that mucking with @_ is a bad
idea, but I can't find the reference.
--tom
In comp.lang.perl.misc, jpn@genrad.com (John P. Nelson) writes:
:The following script consistantly causes perl5.001m to dump core on a
:variety of platforms. The exact behavior is a little different
:on different platforms, though. If the script works, it should print
:10 lines and then exit: it seems to die consistantly after printing
:3 lines.
:
:#! /usr/bin/perl
:
:for (1..10) {
: print "Trial $_\n";
: &foo("a", "b", "c");
:}
:
:sub foo {
: local(@array) = @_;
: local(@_);
:
: @_ = @array;
:}
--
Tom Christiansen Perl Consultant, Gamer, Hiker tchrist@mox.perl.com
The notion of a "record" is an obsolete remnant of the days of the
80-column card.
--Dennis M. Ritchie