$ cat hello.sh #!/usr/bin/bash echo "hello world!" #### $ perl -e '$command = "./hello.sh"; $out = `$command`; print $out, "\n";' #### $ perl -e '$command = "./hello.sh"; $out = `bash $command`; print $out, "\n";' hello world! #### $ perl -e '$command = "bash ./hello.sh"; $out = `$command`; print $out, "\n";' hello world!