in reply to quoting style for lists
However, there are two exceptions. If a string looks like a valid identifier it doesn't have to be quoted if it's either used as a hash key, or on the left side of a fat arrow (=>). This is done to help the programmer; there is little room for mistakes here, when used as a hash key, you usually mean to use the string, not to call a possible function with that name (called without arguments). If you do want to call such a function, you can always preceed it with a +, or a put () behind it.
the qw() function turns whitespace-delimited unquoted string literals into a list of quoted string literals, if I'm not mistaken.You are very mistaken. You are confusing syntax with semantics. qw returns a list of strings. Strings are values. The different forms of string literals (bareword, single quoted, double quoted, here document) are syntax constructs, but once compiled, there's no difference.
Abigail
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: quoting style for lists
by erikprice (Initiate) on Aug 01, 2002 at 17:26 UTC | |
by Abigail-II (Bishop) on Aug 01, 2002 at 17:36 UTC | |
by runrig (Abbot) on Aug 01, 2002 at 19:53 UTC | |
by chromatic (Archbishop) on Aug 01, 2002 at 17:37 UTC | |
by mirod (Canon) on Aug 01, 2002 at 17:59 UTC | |
by crenz (Priest) on Aug 01, 2002 at 17:51 UTC | |
by erikprice (Initiate) on Aug 02, 2002 at 15:44 UTC |