in reply to how does qx select a "/bin/sh equivalent"?
Looking at $SHELL isn't necessarily a reliable way to determine what shell variant is being used. As strace shows, Perl is doing an execve("/bin/sh", ["sh", "-c", "echo $SHELL"] ... (at least on Linux), and that's essentially all it can do... Other than that, it's the shell's job to behave like a classic bourne shell when being called as /bin/sh (which bash actually claims to do...).
In Section
Seekers of Perl Wisdom