in reply to strict subs and bareword exceptions

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.
The equivalent non-"=>" statement would be:

      print 'nono', "1";

In the statement:
      print nono => "1";
the "=>" is not acting as a dot. Rather it really is acting as a comma (plus the quoting of the preceding bareword). The two values ("nono" and "1") are simply being printing one after the other.

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.

------------------------------------------------------------
"Perl is a mess and that's good because the
problem space is also a mess.
" - Larry Wall

  • Comment on Re: strict subs and bareword exceptions