in reply to remove lines from file ending with / char
This task can be done with a one-liner. Refer to the runtime options /e, /i, and /p in perldoc perlrun.