in reply to Re^2: Print while filtering ouput...
in thread Print while filtering ouput...

I couldn't determine how to apply your suggestion to my code.

It's a replacement for your code. Replace infile and outfile with the name of your files.

-ne"print if !m{/}" expands to

while (<>) { print if !m{/} }

And that's all the code you need to do what you asked.