Help for this page

Select Code to Download


  1. or download this
    foreach(my @temp = @arr) {
        push @arr, 'd' if $_ eq 'a';
    ...
        push @arr, 'f' if $_ eq 'c';
        print $_;
    }
    
  2. or download this
    for(my $i = 0; $i < @arr; $i++) {
        local $_ = $arr[$i];  
    ...
        push @arr, 'f' if $_ eq 'c';
        print $_;
    }
    
  3. or download this
    foreach(() = @arr) {
       print;
    }
    
  4. or download this
    $x = () = @arr;