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"