[comp.lang.perl] while

gelato@astrosun.tn.cornell.edu (Sergio Gelato) (07/24/90)

I accidentally discovered that some syntax errors don't get detected at
compile time as they should (example follows). This was at patchlevel 15, but
I haven't seen anything that fixes the problem in patch16-18.
        Given the panic: message, I suspect that Larry already knows about
the problem; still, I think it should be fixed---or at least documented.

% cat bug.pl
#!/usr/local/bin/perl
while ($arg = shift) {
  print "Argument is $arg\n";
} elsif (1 == 1) {
  warn "This will never be executed, but will cause a problem.\n";
}
% perl -v
$Header: perly.c,v 3.0.1.4 90/02/28 18:06:41 lwall Locked $
Patch level: 15

Copyright (c) 1989, Larry Wall

Perl may be copied only under the terms of the GNU General Public License,
a copy of which can be found with the Perl 3.0 distribution kit.
% perl bug.pl 1 2 3
Argument is 1
panic: ELSIF at bug.pl line 4.
% 

-- 
Sergio Gelato <gelato@AstroSun.TN.Cornell.Edu>