nbtrap has asked for the wisdom of the Perl Monks concerning the following question:
There are two cases where I can't figure out why bare identifiers are auto-quoted, even under strictures:
perlop(1) says that "The "=>" operator is a synonym for the comma except that it causes a word on its left to be interpreted as a string if it begins with a letter or underscore and is composed only of letters, digits and underscores." Why is "-foo" quoted?use strict; my %hash = (-foo => 'bar');
Now, the second example:
Why does this work? If I use just "init" without the dash, perl complains of a bareword.use strict; use Gtk2 -init;
Back to
Seekers of Perl Wisdom