in reply to File Handle qwerk?

Backtick issue that's been pointed out aside, it's almost pointless to spawn an extra grep process from a shell command run from Perl. Just do the winnowing of the output yourself by judicious use of next inside the while loop processing the lines.

(And I seem to recall an admonition in Perl Best Practices against using anything but IO::File or three argument open.)