in reply to Using Perl's open() to investigate bash login environment
I'm surprised it works in Cygwin. Reading man bash shows that you should probably use
bash -c 'command builtin declare -p -F' # ~~
> seeing shell metacharacters in the open string would have caused perl to automatically invoke a shell
Yes, it causes perl to invoke a shell. But "a shell" is /bin/sh on Linux, not bash (on some systems, /bin/sh is bash in sh compatibility mode, but e.g. on Ubuntu, /bin/sh is /bin/dash).
|
|---|