Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Query about barewords

by runrig (Abbot)
on Sep 06, 2012 at 15:57 UTC ( #992126=note: print w/ replies, xml ) Need Help??


in reply to Re: Query about barewords
in thread Query about barewords

The "bareword" may also start with a "-".


Comment on Re^2: Query about barewords
Replies are listed 'Best First'.
Re^3: Query about barewords
by johngg (Abbot) on Sep 06, 2012 at 16:31 UTC

    It seems to treat as an octal number, converts to decimal and then stringifies by the look of it.

    $ perl -Mstrict -Mwarnings -MData::Dumper -E ' > my %hash = ( > 011 => q{nine}, > 11 => q{eleven}, > _2t => q{fruity}, > ); > print Data::Dumper->Dumpxs( [ \ %hash ], [ qw{ *hash } ] );' %hash = ( '11' => 'eleven', '_2t' => 'fruity', '9' => 'nine' ); $ $ perl -Mstrict -Mwarnings -MData::Dumper -E ' > my %hash = ( > 08 => q{eight}, > 11 => q{eleven}, > _2t => q{fruity}, > ); > print Data::Dumper->Dumpxs( [ \ %hash ], [ qw{ *hash } ] );' Illegal octal digit '8' at -e line 3, at end of line Execution of -e aborted due to compilation errors. $

    A zero on its own is fine.

    Update: I'm an idiot, I meant to post as a reply to this :-(

    Cheers,

    JohnGG

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://992126]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2015-07-08 04:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (94 votes), past polls