Just another Perl shrine | |
PerlMonks |
Re: strict subs and bareword exceptionsby dvergin (Monsignor) |
on Feb 22, 2002 at 08:25 UTC ( [id://146902]=note: print w/replies, xml ) | Need Help?? |
print nono => "1"; is not the same as
print nono, 1; or even print nono, "1";
That is because
the "=>" also quotes the bareword that comes before it.
print 'nono', "1";
In the statement:
Mind you, at some deeper level, the list following the print statement is being concatenated. But I would encourage you not to make explanations about "=>" becoming a dot in that situation. This will just confuse things.
------------------------------------------------------------
In Section
Seekers of Perl Wisdom
|
|