my @x = ( 'apple', 'banana', 'orange' ); while ( my ($i, $val) = each @x ) { print "$i $val\n"; }