in reply to Re^3: Passing commands to subroutines
in thread Passing commands to subroutines

Probably easier to use one of the IPC:: modules, maybe IPC::Cmd