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

Re: [perl #50742] goto error?

Thread Previous
From:
Dave Mitchell
Date:
February 12, 2008 04:04
Subject:
Re: [perl #50742] goto error?
Message ID:
20080212115846.GD18823@iabyn.com
On Tue, Feb 12, 2008 at 12:49:20PM +0100, Abigail wrote:
> Yeah, that's what I first thought as well. But:
> 
>     $ perl -wce 'LABEL:'
>     -e syntax OK
>     $
> 
> Apparently, perl will infer a null statement in this case, as deparsing
> shows:
> 
>     $ perl -MO=Deparse -wce 'LABEL:'
>     BEGIN { $^W = 1; }
>     LABEL: ;
>     -e syntax OK
>     $

Actually, the perl tokeniser usually inserts a ';' at the end of each
file:

$ echo 'FIN:' > /tmp/g
$ perl5100 -DT /tmp/g 2>&1 | grep '<=='
### <== LABEL(pval="FIN")
### <== ';'
### <== EOF
$


-- 
You're only as old as you look.

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About