Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -wT
    
    user strict;
    
  2. or download this
    while (<>) {
        $array[$index++] = $_ if /$searchstring/;
    }
    
  3. or download this
    while (<>) {
        push (@array, $_) if /$searchstring/;
    }
    
  4. or download this
    if (/$searchstring/) { &doSomething }
    
    &doSomething if /$searchstring/;