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

[perl #53808] elseif should be elsif at blahblah.pl line 103.

Thread Previous
From:
Steve Peters via RT
Date:
May 12, 2008 06:11
Subject:
[perl #53808] elseif should be elsif at blahblah.pl line 103.
Message ID:
rt-3.6.HEAD-1304-1210597894-693.53808-15-0@perl.org
On Wed May 07 01:41:04 2008, ben.aveling@alcatel-lucent.com.au wrote:
> Hi,
> 
>  
> 
> I've just received an error message saying:
> 
> elseif should be elsif at blah.pl line 103.
> 
>  
> 
> What happened to do-what-I-mean?
> 
>  
> 
> Perl is usually pretty forgiving.  In this case, it knows that I should
> have typed elsif, so why does it care that I typed elseif?  Why not just
> treat it as if I'd typed elsif?
> 
>  

Unfortunately, the keyword is elsif, not elseif.  Perl is simply nice
enough to warn you what your specific syntax error is in this case
rather than simply returning a syntax error.  

Steve Peters

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