Re: Why doesn't Perl complain about this bareword?
- From: sheinrich@xxxxxxxxxxx
- Date: Wed, 7 May 2008 07:47:54 -0700 (PDT)
On May 7, 1:45 pm, "A. Sinan Unur" <1...@xxxxxxxxxxxxxxxxxxx> wrote:
....
Note the following cases:But why is the first argument being taken here for a filehandle, in
C:\t> perl -w -Mstrict -e "print Does,Not,Exist, qq{\n}"
No comma allowed after filehandle at -e line 1.
In this case, Does has a valid interpretation as a
bareword filehandle. Thus, strict does not kick in.
spite of the comma, and not considered as namespace, as in your other
example?
....
Again, let's go back to:
C:\t> perl -w -Mstrict -e "print Does::Not::Exist, qq{\n}"
Does::Not::Exist
The comma establishes that Does::Not::Exist is not referring to
filehandle Exist in the package Does::Not.
It seems like only Strings containing :: (or ' ) qualify as possible
package names.
Steffen
.
- Follow-Ups:
- Re: Why doesn't Perl complain about this bareword?
- From: A. Sinan Unur
- Re: Why doesn't Perl complain about this bareword?
- References:
- Why doesn't Perl complain about this bareword?
- From: Ronny
- Re: Why doesn't Perl complain about this bareword?
- From: Ben Bullock
- Re: Why doesn't Perl complain about this bareword?
- From: sheinrich
- Re: Why doesn't Perl complain about this bareword?
- From: A. Sinan Unur
- Why doesn't Perl complain about this bareword?
- Prev by Date: Re: perl PNG image searching
- Next by Date: Net::SMTP fails
- Previous by thread: Re: Why doesn't Perl complain about this bareword?
- Next by thread: Re: Why doesn't Perl complain about this bareword?
- Index(es):
Relevant Pages
|