Help for this page

Select Code to Download


  1. or download this
    perl -e "my $str='foo bar bat'; if ($str =~ /(foo) bar (bat)/ ) {print
    + \"\$1: $1; \$2: $2)\"; }"
    $1: foo; $2: bat)
    
  2. or download this
    perldoc -f chomp
        chomp VARIABLE
        chomp( LIST )
    ...
                total number of characters removed from all its arguments.
    + It's
                often used to remove the newline from the end of an input 
    +record
                 ....