Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: perl -e hash assignment and range operator bug

by Rudif (Hermit)
on Aug 27, 2001 at 01:31 UTC ( [id://107991] : note . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    H:\>perl -e"%a=( 1..10, 11..20 );print keys %a"
    137159117319115
    
  2. or download this
    H:\>perl -e"%a=( 1..10, 11..20 );print qq{@{[keys %a]}}"
    13 7 15 9 1 17 3 19 11 5
    
  3. or download this
    perl -MData::Dumper -e "%a= 1 .. 10, 2 .. 11 ;print Dumper \%a"
    
  4. or download this
    H:\>perl -MData::Dumper -e "%a= 1 .. 10, 2 .. 11 ;print Dumper \%a"
    $VAR1 = {
    ...
              '5' => 6
            };