Help for this page

Select Code to Download


  1. or download this
    my @array = (2,4,7,5,8);;
    my($i, $v ) = each @array until $v == 7;;
    print $i;;
    2
    
  2. or download this
    my @array = (2,4,7,5,8);;
    my $i = 0;;
    ++$i until $array[ $i ] == 7;;
    print $i;;
    2