On Tue, Jul 03, 2001 at 01:12:34PM -0400, Brett W. McCoy wrote:
> Nothing.  If you use the => operator, quotes around the keys are not
> required.  Quotes are also not required when using single word keys hwne
> retrieving a value:

With => quotes around the keys are not -always- required.  The quotes are
required if the key isn't an identifier (matched by
/^[A-Za-z_][A-Za-z0-9_]*$/) or a number, or some notable exception.

Consider:

    %foo = (
        foo-bar =>  1,  # tries to subtract 'bar' from 'foo'
        -test   =>  2,  # key "-test"
        foo()   =>  3,  # calls the function foo()
        900     =>  4,  # key "900"
    );


So => does what you mean, usually, but it does not always auto-quote its
left side.


Michael
--
Administrator                      www.shoebox.net
Programmer, System Administrator   www.gallanttech.com
--

Reply via email to