in reply to how does qx select a "/bin/sh equivalent"?
To see what Perl uses,
$ perl -le'use Config; print $Config{sh}' /bin/sh
But note that on many systems, /bin/sh is bash.
$ /bin/sh -c 'echo $SHELL' /bin/bash
If you want to use an alternate shell,
sub backticks_mysh { open(my $pipe, '-|', '/bin/mysh', '-c', $_[0]) or return; local $/ = wantarray ? $/ : undef; <$pipe> }
In Section
Seekers of Perl Wisdom