Help for this page

Select Code to Download


  1. or download this
    perl -ne 'print if (/MYLARGEREGEX_HERE/../END_OF_BLOCK/)' inputfile > 
    +outputfile
    
  2. or download this
    #!perl
    
    ...
    while(<$fh_big_file>) {
      print if (/$regex/../^END_OF_BLOCK/);
    }
    
  3. or download this
    while(<$fh_big_file>) {
      print if (/MY_HUGE_REGEX_JUST_PLAIN/../^END_OF_BLOCK/);
    }
    
  4. or download this
    while(<$fh_big_file>) {
      print if (/$regex/o .. /^END_OF_BLOCK/);
    }