nillbug

Untitled

May 10th, 2014
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. my $in_file = 'cn.txt';
  2. open my $in_fh, '<', $in_file or die "Could not open file $in_file: $!
  3. +";
  4.  
  5. my $out_file = 'liboutput.txt';
  6. open my $out_fh, '>', $out_file or die "Could not open file $out_file:
  7. + $!";
  8.  
  9. while ( my $line = <$in_fh> ) {
  10. print {$out_fh} $line if $line =~ /\|LIB\|/;
  11. }
  12.  
  13. close $in_fh or die "Could not close file $in_file: $!";
  14. close $out_fh or die "Could not close file $out_file: $!";
Advertisement
Add Comment
Please, Sign In to add comment