View Single Post
  #2 (permalink)  
Old 05-21-11, 09:27 AM
wickedxter wickedxter is offline
New Member
 
Join Date: Apr 2011
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Code:
#!/usr/bin/perl
use strict;
use IO::Handle;

open(OUT,">>posoutfile.txt");  #open output file for appending so multi writes can happen
open(IN, "posfile.txt");    ## this file will be growing open input for reading
while (<IN>){    # read each line of posfile.txt
 ($line) = split(/\|/,$_); # split each line with the |
 print OUT $line if ($line =~ //); # match using a regex to capture what ur lookin for and print to OUT
}
close IN;
close OUT;
hope this helps or if not let me know.
Reply With Quote