Help for this page

Select Code to Download


  1. or download this
    # you originally have two parallel arrays of related data
    my @a = (6, 7, 8);
    ...
       my ($a,$b) = @$item;
       print $a, "\n" if $b>1;
    }
    
  2. or download this
    # An array of hash references can be pretty nice, too:
    my @c = (  
    ...
    for my $item (@c) {
       print $item->{a},"\n" if $item->{b}>1;
    }