msx has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
Hoping someone could enlighen me. I have a file containing lines which consists of filenames and directories. I need to strip all empty directory entries in this file. Below is an example of the file contents:
Filname is filelist.txt
I'm trying in vain to remove all lines ending with the / char. Note there could be any number of lines ending with / and they could be anywhere in the file. Any wisdom will be greatly appreciated.:BOF /peter/john/lilly.pdf /john/peter/jill.pdf /jimmy/gill/ /wilbur/yankee/ /lola/riley/jibmo.txt /rolly/polly/quebe.lst :EOF
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: remove lines from file ending with / char
by swampyankee (Parson) on Sep 03, 2012 at 13:23 UTC | |
Re: remove lines from file ending with / char
by choroba (Cardinal) on Sep 03, 2012 at 13:14 UTC | |
Re: remove lines from file ending with / char
by BillKSmith (Monsignor) on Sep 03, 2012 at 19:01 UTC | |
Re: remove lines from file ending with / char
by philiprbrenan (Monk) on Sep 06, 2012 at 00:13 UTC |
Back to
Seekers of Perl Wisdom