in reply to beginner question - why is hash key unquoted and in capitals
Doesn't look that way to me. $dir should be a straight scalar variable. Nothing is being dereferenced with that syntax either.
But why is the key CALLBACK in captials and unquoted.
The caps are presumably just style. You can use string literals/barewords unquoted in perl if you run without use strict -- which general consensus at this point is there is no reason to not use strict. It helps. (You will get a warning if you use warnings anyway, about potential future reserved words.) HOWEVER, as per previous posts, hash keys are always okay.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: beginner question - why is hash key unquoted and in capitals
by morgon (Priest) on Oct 15, 2010 at 16:40 UTC | |
by locked_user sundialsvc4 (Abbot) on Oct 15, 2010 at 16:49 UTC | |
by halfcountplus (Hermit) on Oct 15, 2010 at 17:34 UTC | |
by morgon (Priest) on Oct 15, 2010 at 17:47 UTC | |
|
Re^2: beginner question - why is hash key unquoted and in capitals
by Anonymous Monk on Oct 15, 2010 at 20:42 UTC | |
by kennethk (Abbot) on Oct 16, 2010 at 15:31 UTC | |
by Anonymous Monk on Oct 16, 2010 at 16:35 UTC |