Drieux wrote at Tue, 30 Jul 2002 02:51:27 +0200:

> On Monday, July 29, 2002, at 04:05 , Tómas Guðmundsson wrote: [..]
>> my $phone_book = qw{
      ^
>>   Fred 0123
>>   John 4567
>>   Bill 8901
>> };
> 
> you might want to think of using a hash here
> instead of a straight array, hence
> 
> my %phone_book = (
>    Fred => 0123,
>    John => 4567,
>    Bill => 8901,
> );

Or if you are too lazy too retype so much,
you can simply change the $ to a % and everything is fine.

But note
0123
is an octal number,
so when it is used as integer,
it's interpreted as 83.

However, the error doesn't occur when you simply change the $ to a % :-))


Cheerio,
Janek


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to