> -----Original Message----- > From: Michael R. Wolf [mailto:[EMAIL PROTECTED]] > Sent: Monday, December 17, 2001 10:27 PM > To: [EMAIL PROTECTED] > Subject: Re: Shift and "=>" > > => is the stringifying-coma it's just like a coma, but it > forces its LHS to be a string.
For the benefit of others, note that this is subject to the caveat that the unquoted word must match the rules for an identifier, with an optional leading '-' sign. e.g.: foobar => 'baz' # OK foo_bar => 'baz' # OK foo::bar => 'baz' # OK -foobar => 'baz' # OK (see perldoc perlop) foo bar => 'baz' # not OK, must quote 'foo bar' foo:bar => 'baz' # not OK, must quote 'foo:bar' foo-bar => 'baz' # not OK, must quote 'foo-bar' Note also that these rules apply to hash keys in braces: $ENV{PATH} is OK; no need for $ENV{'PATH'} $baz{foo bar} is not OK, you need $baz{'foo bar'} -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]