"John W. Krahn" schreef:
> Dharshana Eswaran:
>> %TypeofNumber = ( 00 => Integer, 01 => Floating, 10 => Char, 11 =>
>> Double );
>
> Perl interprets numbers beginning with 0 as octal and the other
> numbers as decimal so 00 is the number 0, 01 is the number 1, 10 is
> the number ten and 11 is the number eleven.
<quote src="perlop">
The "=>" operator is a synonym for the comma, but forces any word to
its left to be interpreted as a string (as of 5.001).
</quote>
And AFAICS that isn't true:
$ perl -MData::Dumper -wle'
%n = (00 => Integer, 01 => Floating, 10 => Char, 11 => Double);
print Dumper(\%n)
'
$VAR1 = {
'11' => 'Double',
'1' => 'Floating',
'0' => 'Integer',
'10' => 'Char'
};
So I filed a bug-report about perlop.
--
Affijn, Ruud
"Gewoon is een tijger."
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>