Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] removing the first 10 lines of a text file

Expand Messages
  • tomroth@wfubmc.edu
    Not only did it work but it worked on the first try!!! Thanks a bunch Mike and Happy Ground Hog Day! ... -- Tom Roth • tomroth@wfubmc.edu • tel
    Message 1 of 1 , Feb 2, 2001
    • 0 Attachment
      Not only did it work but it worked on the first try!!!

      Thanks a bunch Mike and Happy Ground Hog Day!


      > Mike Payne wrote:
      >
      > Untested, but this should work.
      >
      > open(FILE,"file.txt");
      > @file = <FILE>;
      > close(FILE);
      >
      > for (1..10) { shift(@file); }
      >
      > open(FILE,">file.txt");
      > foreach $_ (@file) { print FILE $_; }
      > close(FILE);


      > > From: tomroth@...
      > >
      > > How can I remove just the first 10 lines of a text file?

      --
      Tom Roth • tomroth@... • tel 336.716.4493
      Wake Forest University School of Medicine
      Dept of Biomedical Communications
      Medical Center Blvd • Winston-Salem, NC 27157-1011
      http://www.wfubmc.edu/biomed/
    Your message has been successfully submitted and would be delivered to recipients shortly.