Help for this page

Select Code to Download


  1. or download this
    my $value;
    while (condition) # or for loop
    {
      $value <op>= something;
    }
    
  2. or download this
    my $sum; 
    $sum += $_ for @nums;
    
  3. or download this
    my $valid;
    while (<DATA>)
    ...
      next if /INVALID/;
      $valid .= $_;
    }
    
  4. or download this
    my $product;
    $product *= $_ for @nums;