How about this?
#!/usr/bin/perl use strict; open (INPUT, "<", "inputfile.txt"); open (OUTPUT, ">", "outputfile.txt"); while (<INPUT>) { print OUTPUT "$_"; last if $_ =~ m/DATA LIST/; } close INPUT; close OUTPUT;
Hope you find your answer...
MichaelIn reply to Re: Coping a part of text file
by mtmcc
in thread Coping a part of text file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |