in reply to Re: Why is this auto-quoted?
in thread Why is this auto-quoted?
One effect of these rules is that -bareword is equivalent to the string "-bareword"
Not really quit!. Check with B::Deparse, then you will discovery that -bareword is equalvalent to -'bareword' not '-bareword'
givesperl -MO=Deparse -e' use warnings; use strict; my %ha = ( -foo => "bar"); print %ha; '
Though with "-foo" there is no need of "=>".use warnings; use strict; my %ha = (-'foo', 'bar'); print %ha; -e syntax OK
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Why is this auto-quoted?
by Anonymous Monk on Jul 31, 2013 at 03:39 UTC | |
by QM (Parson) on Jul 31, 2013 at 08:45 UTC | |
by Anonymous Monk on Jul 31, 2013 at 09:13 UTC | |
by tobyink (Canon) on Jul 31, 2013 at 11:29 UTC | |
by QM (Parson) on Jul 31, 2013 at 15:54 UTC | |
by Anonymous Monk on Aug 01, 2013 at 07:59 UTC |