$ ReadAPipe3.pl This was read from the pipe: <> These are the list of parameters: <> $ ReadAPipe3.pl 1 2 3 This was read from the pipe: <> These are the list of parameters: <1 2 3> $ echo abc | ReadAPipe3.pl 1 2 3 This was read from the pipe: These are the list of parameters: <1 2 3> $ (sleep 3; echo abc ) | ReadAPipe3.pl 1 2 3 This was read from the pipe: These are the list of parameters: <1 2 3> $ echo abc | ReadAPipe3.pl This was read from the pipe: These are the list of parameters: <> $ sleep 3 | ReadAPipe3.pl 1 2 3 This was read from the pipe: <> These are the list of parameters: <1 2 3>