Need a simple PERL script to remove blank lines from txt file
Posted on 2006-05-06
I need a perl script that will iterate through a txt file and REMOVE any lines that match this regex: m/\A(?:^\|.\|..\|.+$)\z/m)
An example of a line the regex is to match is: "| | | +--ActiveX" (in case my regex isn't ideal).
The name of the txt file can be hard coded, as it will not change (don't need to prompt for it). It will be "tree.txt".
Lastly, I would rather have a few more lines of code in order for the script to be easily understood, as this is more important to me than brevity.