The program:
#!/usr/bin/perl
if (0) {die aa;}
elsif (1) {die bb;}
gives the error message bb at ./wrong.pl line 2.,
although it died at line 3.
[EMAIL PROTECTED]:
The 'if (0) {die aa;}' is optimized away, thus it isn't visible for
the tokenizer which thinks it's line #2.
Michael G Schwern wrote :
On Thu, Dec 13, 2001 at 08:30:12AM +0100, [EMAIL PROTECTED] wrote:
I am sorry for oversimplifying the example.
The same bug appears in:
#!/usr/bin/perl
if ($ARGV[0]) {die aa;}
elsif ($ARGV[1]) {die bb;}
if it is run with command line parameters 0