On Mar 7, 2014, at 1:58 PM, s...@missionstclare.com wrote: > I have some text files from which I would like to remove the first line, but > only if it's blank. Any hints? I tried a few things, but the results haven't > quite been satisfactory.
You should be able to do that in just a few lines of Perl: 1. Open the existing file for reading. 2. Open a new file for writing. 3. Read the first line in the input file. 4. If the first line is not blank, write it to the output file. 5. Read the remaining lines from the input file and write to the output file. 6. Close both files 7. Optionally: rename both files to give the new file the same name as the old file. If you don't understand any of the steps, just ask. If you have trouble, post your program here, and someone will be able to help you. Good luck. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/