Re: [PBML] Quoting hash keys changes things sometimes

2008-11-15 Thread Chas. Owens
On Sat, Nov 15, 2008 at 17:42, Jenda Krynicky <[EMAIL PROTECTED]> wrote: snip > The rule for automatic quoting within $hash{...} is "if it looks like > word, it doesn't have to be quoted". And - is not in the list of word > characters as far as Perl is concerned. snip Not exactly. A hyphen is all

Re: [PBML] Quoting hash keys changes things sometimes

2008-11-15 Thread Jenda Krynicky
From: "Kelly Jones" <[EMAIL PROTECTED]> > Consider: > > perl -le '$hash{"foo-bar"} = 1; print $hash{foo-bar}' > [no result] > > perl -le '$hash{"foobar"} = 1; print $hash{foobar}' > 1 > > I sort of understand this: in the first script, Perl treats foo-bar as > a subtraction, and sets $hash{0} to