It is not perl that can't be found; it is either
env's or
bash's handling of the argument. If I remove the
-w and/or the
-wd arguments the scripts execute, but of course, without the benefit of those switches.
The man page for
env asserts that any command may take an argument. I have tried every way I can think of to quote the
-w and the
-wd but
env is treating these perl command line arguments as filenames, and since they aren't files, renders that error message. I'm running the latest
coreutils as in this apt-get fragment:
Reading package lists... Done
Building dependency tree
Reading state information... Done
coreutils is already the newest version (8.26-3).
Both of these shebangs work correctly in macOS 10.13.3 with the native perl from Apple and perlbrew perl. That is where I do most of my perl work but now I need to move those scripts to debian, without changing the shebangs. Is this a bug in
env, something in bash or pilot error?
Regards,
T.W. Schmidt