peppiv has asked for the wisdom of the Perl Monks concerning the following question:
Works great! However, some of the data is actually set up like this:my %hash = map { chomp; split /,/ } <DATA>; print $hash{1006},$/; __DATA__ 1001,choochoo 1002,candycane 1003,sockpuppet 1004,choochoo 1005,candycane 1006,sockpuppet6 1007,foo 1008,bar
This doesn't work with references that start with '0'. In fact the '0109' even gives the 'illegal octal digit' warning.__DATA__ 0001,choochoo 0002,candycane 0003,sockpuppet 0109,choochoo
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Hash references and illegal octal digits
by Mr. Muskrat (Canon) on Dec 24, 2002 at 15:57 UTC | |
by peppiv (Curate) on Dec 24, 2002 at 16:04 UTC | |
by peppiv (Curate) on Dec 24, 2002 at 20:02 UTC | |
by I0 (Priest) on Dec 24, 2002 at 23:18 UTC | |
by MarkM (Curate) on Dec 24, 2002 at 20:15 UTC | |
by Mr. Muskrat (Canon) on Dec 24, 2002 at 20:12 UTC |