"be consistent" | |
PerlMonks |
Re^2: shebang problem on openSUSEby kcott (Archbishop) |
on Mar 24, 2018 at 05:15 UTC ( [id://1211647]=note: print w/replies, xml ) | Need Help?? |
Thanks for replying. "A search on DuckDuckGo brings up some relevant results." That is, in fact, the search engine I used. Could you post the URL you used which returned the "relevant results". I seached for "shebang perl openSUSE", which ended up as this URL: https://duckduckgo.com/?q=shebang+perl+openSUSE&t=opensuse&ia=qa. I didn't see any results where 'perl -l' (or 'perl -w' or similar) was treated as a single filename containing a space character. As I wrote that, I thought I might try the same code as before with this shebang line:
When run, that now produces:
I checked "man env" and subsequently, from the information it suplied, "info '(coreutils) env invocation'" and http://www.gnu.org/software/coreutils/manual/coreutils.html#env-invocation. All show an invocation of this form:
As far as I can see, none mention anything special about the space after "command". I've been using shebang lines like this for over a decade. I would have posted dozens (if not hundreds) of scripts on this site using "#!/usr/bin/env perl -l" without a single complaint. If 'perl -l' is being interpreted as a single filename (containing a space character), that would be most unusual behaviour and I would hope there would be a way to turn it off. — Ken
In Section
Seekers of Perl Wisdom
|
|