Popcorn Dave has asked for the wisdom of the Perl Monks concerning the following question:
The other night I was trying to finish debugging some code, and by a slip of the fingers accidently typed:
sub( bunch of code here )
instead of:
sub{ bunch of code here }
and it managed to crash ActiveState Perl on my win box with an invalid page fault, and on my linux box it gave me a segmentation fault.
My wonderment is why this didn't just return a syntax error at line whatever rather than it's behaviour. What is so special about using parenthesis that caused perl to freak?
Any ideas or is this some odd bug in perl that nobody ever really sees because they're such good typists?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Odd behaviour by perl (boo)
by boo_radley (Parson) on Apr 26, 2002 at 06:34 UTC | |
|
Re: Odd behaviour by perl
by abstracts (Hermit) on Apr 26, 2002 at 06:22 UTC | |
|
Re: Odd behaviour by perl
by particle (Vicar) on Apr 26, 2002 at 12:23 UTC |