Trying to run perl system command with a full blown shell environment. Similar to Python’s Popen with shell=True. Tried system(‘/bin/bash -c “something”‘) and that didn’t work. Someone hook a non-perl guy up!
— update —
# ./test.pl
ENV-PATH: /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
sys-PATH: /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
So it appears that if you use the system() command it doesn’t truly invoke a shell unless a shell meta character is seen OR the arg is in the form of a scalar. So system(“echo real shell”) works in my case but not system(“echo”, “real”, “shell”).