Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: "perl script.pl args" or "script.pl args"

by Abigail-II (Bishop)
on Jul 17, 2003 at 20:38 UTC ( [id://275387]=note: print w/replies, xml ) Need Help??


in reply to "perl script.pl args" or "script.pl args"

I always put the she-bang line in, if only because it lets my editor know it's a Perl program. Furthermore, it allows you to put arguments to perl itself there - although since we have 5.6, I don't do it so often anymore. I used to put -w on the shebang line, but now we have lexical warnings. -T still goes there, for the few programs I write that need it. Every now and then I put -l or -p/-n there, but that's fairly uncommon.

Having said that, even with a she bang line, I sometimes do perl program args. Typically if the program doesn't have the execute bit set yet. Or if I cut-and-pasted a program from perlmonks or comp.lang.perl.misc that doesn't have a she-bang line, or has a she-bang line not pointing to a perl on my machine.

Abigail

  • Comment on Re: "perl script.pl args" or "script.pl args"

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-26 08:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found