in reply to if modifier of a print statement

So I changed the first print line to

print ($_ . "\n") && next if /no_proc/;

This gives the output I want, but also the note

print (...) interpreted as function at ...

You get that warning message because of the space between print and the left parenthesis.   If you had written it as

print($_ . "\n") && next if /no_proc/;

you would not get a warning.