Help for this page

Select Code to Download


  1. or download this
    my @array = qw(foo bar); 
    while (my ($attrib, $value) = each (@array) ) { 
      print "$attrib=$value\n"; 
    }
    
  2. or download this
    my @array = qw(foo bar); 
    while (my ($attrib, $value) = each (my %hash = @array) ) { 
      print "$attrib=$value\n"; 
    }
    
  3. or download this
    my @array = qw(foo bar); 
    my %hash = @array; 
    while (my ($attrib, $value) = each (%hash) ) { 
      print "$attrib=$value\n"; 
    }