Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    my $str = 'World';
    print "Hello $str\n";
    print 'Hello $str\n";
    
  2. or download this
    # inplace edit with backup
    perl -pi.bak -e 's/this/that/' ./somefiles*
    ...
    # perl grep
    perl -ne 'print "$.\t$_" if m/some_re/' ./file.txt