Help for this page

Select Code to Download


  1. or download this
    >perl -wMstrict -le
    "my $s = '1a2b3c';
    ...
    matched '3c'
    matched '3c'
    matched '3c'
    
  2. or download this
    $pattern = 'Seuss';
         while (<>) {
             print if /$pattern/;
         }
    
  3. or download this
    #!/usr/bin/perl
         #    Improved simple_grep
    ...
         while (<>) {
             print if /$regexp/o;  # a good deal faster
         }