my $shellfile = 'foo.sh'; my @cmd = ('/bin/sh', '-p', $shellfile); my $res = system (@cmd);