crazyinsomniac has asked for the wisdom of the Perl Monks concerning the following question:
I try all my activeperl installs, nada. I try all my indigoperl installs, same thing (btw this be 5.6.0 and 5.6.1 builds 618 and up)
Meanwhile, BooK says, yes it does, and spits Dumper in the cb: perl -MData::Dumper -e'print { 1..10, 11..20 } and sure enough, Dumper dumps a hash like:
$VAR1 = { '13' => 14, '7' => 8, '15' => 16, '9' => 10, '1' => 2, '17' => 18, '3' => 4, '19' => 20, '11' => 12, '5' => 6 };
So I ssh over to jcwrens machine and sure enough i get some keys (111313515717919).
So now I says to me, this must be a bug, and to confirm, i try: perl -MData::Dumper -e "%a= 1 .. 10, 2 .. 11 ;print Dumper \%a" which yields nada, and then perl -MData::Dumper -e "$a={ 1 .. 10, 11.. 20};print Dumper $a" which spits our (as expected)
So, I think this is a win32 bug. Can anyone confirm/deny? Anyone have any idea where it is, sourcecode wise? (like foo.c or something)$VAR1 = { '13' => 14, '7' => 8, '15' => 16, '9' => 10, '1' => 2, '17' => 18, '3' => 4, '19' => 20, '11' => 12, '5' => 6 };
___crazyinsomniac_______________________________________
Disclaimer: Don't blame. It came from inside the void
perl -e "$q=$_;map({chr unpack qq;H*;,$_}split(q;;,q*H*));print;$q/$q;"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perl -e hash assignment and range operator bug
by japhy (Canon) on Aug 26, 2001 at 20:29 UTC | |
by crazyinsomniac (Prior) on Aug 26, 2001 at 20:40 UTC | |
by japhy (Canon) on Aug 26, 2001 at 21:04 UTC | |
|
Re: perl -e hash assignment and range operator bug
by Rudif (Hermit) on Aug 27, 2001 at 01:31 UTC | |
by crazyinsomniac (Prior) on Aug 27, 2001 at 05:08 UTC | |
by Rudif (Hermit) on Aug 28, 2001 at 02:09 UTC |