Help for this page

Select Code to Download


  1. or download this
    $a = [ 1 .. 30 ];
    print @{ $a }[0,1,2,5..10,19]; # prints 1236789101120
    
  2. or download this
    $h = { foo => 1, bar => 2, baz => 3 };
    print @{ $h }{foo, baz}; # prints 13