Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: shebang arguments

by friedo (Prior)
on Jul 03, 2008 at 00:21 UTC ( [id://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.

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://695248]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2024-04-19 21:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found