system($cmd) and die "command failed with code " . ($? >> 8). #### $cmd = 'cd /home/folder1/folder2 && sh test1.sh';