Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: shebang arguments

by friedo (Prior)
on Jul 03, 2008 at 00:21 UTC ( #695248=note: print w/ replies, xml ) Need Help??


in reply to Re: shebang arguments
in thread shebang arguments

Another difference is that if someone runs the perl command against your script then the shebang line will be ignored while "use warnings" will still be enforced.

It may be ignored by the shell, but it isn't ignored by perl.

foo.pl: #!/usr/bin/perl -w $x = $y . $z; $ ./foo.pl Name "main::y" used only once: possible typo at ./foo.pl line 3. Name "main::z" used only once: possible typo at ./foo.pl line 3. Name "main::x" used only once: possible typo at ./foo.pl line 3. Use of uninitialized value in concatenation (.) or string at ./foo.pl +line 3. Use of uninitialized value in concatenation (.) or string at ./foo.pl +line 3. $ perl foo.pl Name "main::y" used only once: possible typo at foo.pl line 3. Name "main::z" used only once: possible typo at foo.pl line 3. Name "main::x" used only once: possible typo at foo.pl line 3. Use of uninitialized value in concatenation (.) or string at foo.pl li +ne 3. Use of uninitialized value in concatenation (.) or string at foo.pl li +ne 3.

BTW, you can use perl -X to force it to ignore -w on the shebang, if you want.


Comment on Re^2: shebang arguments
Select or Download Code
Re^3: shebang arguments
by Argel (Prior) on Jul 03, 2008 at 21:12 UTC
    Ahh, so perl actually checks! Nice!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://695248]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2014-11-27 05:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (180 votes), past polls