Help for this page

Select Code to Download


  1. or download this
    my $file = "file"; # why not...
    my $temp = "temp"; # makes sense if you later want to use
                       # some other basename for your sequence of files
    ...
      open $file, '>', "$temp$_"; # you just turned $file from a string in
    +to a filehandle...
      ...
    }
    
  2. or download this
    foreach (@lines) {
      $_ = uc; # ALL CAPS WOOOOOO
      s/$/!!!/; # EVERY LINE IS AN EXCLAMATION!!!
      print;
    }
    
  3. or download this
    my @timesTable;
    foreach my $row (0..12) { #
    ...
        @timesTable[$row][$col] = $row * $col;
      }
    }
    
  4. or download this
    for ($leetString) { # "loops" only once
      s/very/uber/g;
      tr/astloe/457103/;
      s!w!\\/\\/!g;
    }