Here's one way
#!/usr/bin/perl -w use strict; open(OUT1, ">file1.txt") || die $!; open(OUT2, ">file2.txt") || die $!; while(<>){ print OUT1 if (1 .. /^DETSO1/) =~ /^\d+$/; print OUT2 if /^DETSO1/ .. eof; } __END__
In reply to Re: How to scan a file, find a character string and print from that string to EOF
by Anonymous Monk
in thread How to scan a file, find a character string and print from that string to EOF
by 0p3nfac3
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |