Help for this page

Select Code to Download


  1. or download this
    % perl -I. -Mfeature::each_on_array -E'say $^V; @a = (qw/a b c/); whil
    +e (($i, $e) = each @a) { say $i, $e }'
    v5.10.1
    0a
    1b
    2c
    
  2. or download this
    % perl -I. -Mfeature::each_on_array -E'say $^V; @a = (qw/a b c/); whil
    +e (($i, $e) = each @a) { say $i, $e } package Foo; @b = (qw/a b c/); 
    +while (($i, $e) = each @b) { say $i, $e }'
    Type of arg 1 to each must be hash (not array dereference) at -e line 
    +1, near "@b) "