Help for this page

Select Code to Download


  1. or download this
    while (<SOURCE>) {
       $script = <SOURCE>;
    
  2. or download this
    while (my $script = <SOURCE>) {
    
  3. or download this
    @line=grep( /$script/, @sfile );
    
  4. or download this
    push @lines, grep( /$script/, @sfile );
    
  5. or download this
    @line = grep( /$script[0]|$script[1]|.../, @sfile );
    
  6. or download this
    #!/usr/bin/perl -w
    
    ...
    while (<$in_fh>) {
        print $out_fh $_ if /$pat/;
    }
    
  7. or download this
    #!/usr/bin/perl -w
    
    ...
    while (<>) {
        print if /$pat/;
    }
    
  8. or download this
    filter 30.txt searchfile.txt > newfile.txt