in reply to Undestanding this code snippet

It attempts to open a curiously named file "cat file | /usr/bin/mycommand" for reading and executes the perl code it contains.

I very much doubt that is what you want!

I think you should look at open and perlopentut.


Unless I state otherwise, all my code runs with strict and warnings