The problem seems to be with the fact that it's running as a one liner,
thus confusing oct the string literal for oct() - but I'm wondering how
the shell is intelligent enough to parse the rest of the script...
On 26/07/2011 20:47, Avishalom Shalit wrote:
> the difference is the double quotes in october.
>
>
> -----
>
>
> $ perl -MData::Dumper -e
> '@months=('jan','feb','mar','apr','may','jun','jul','aug','sep','oct','nov','dec');@t{@months}=1..12;print
> Dumper(\%t)'
> $VAR1 = {
> 'feb' => 2,
> 'may' => 5,
> 'mar' => 3,
> 'dec' => 12,
> 'jan' => 1,
> 'aug' => 8,
> 'sep' => 9,
> '0' => 10,
> 'jun' => 6,
> 'nov' => 11,
> 'apr' => 4,
> 'jul' => 7
> };
>
> $ perl -MData::Dumper -e
> '@months=('jan','feb','mar','apr','may','jun','jul','aug','sep',"oct",'nov','dec');@t{@months}=1..12;print
> Dumper(\%t)'
> $VAR1 = {
> 'feb' => 2,
> 'may' => 5,
> 'mar' => 3,
> 'dec' => 12,
> 'jan' => 1,
> 'aug' => 8,
> 'sep' => 9,
> 'jun' => 6,
> 'nov' => 11,
> 'apr' => 4,
> 'oct' => 10,
> 'jul' => 7
> };
>
>
> -- vish
> _______________________________________________
> Perl mailing list
> [email protected]
> http://mail.perl.org.il/mailman/listinfo/perl
_______________________________________________
Perl mailing list
[email protected]
http://mail.perl.org.il/mailman/listinfo/perl