in reply to Coping a part of text file
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...
Michael
|
|---|