This will be a short one. You know how to start a perl program don’t you? You know what is at line 0, starting at character 0, don’t you?
That’s it. That’s what was in front of my perl programs for years. Hell, damned near decades. Every perl program I started was
Now mind you, for a while it was
But I didn’t really understand what the -wc did. I had been told that it was important, and that’s all that there was to it. Then, when I got much smarter, it became:
Because I was not only very good, but very mindful.
Then I learned, I had been doing it wrong all along. You see, @spleck came around one day and said: “why are you hardcoding the perl interpreter?” To which I replied: “What on earth do you mean? Because I am running perl.”
What if you are not running *that* perl? What if you are using some development perl that you have in your local home directory? What if you are running a perl from perlbrew? (To which I replied, what is a perlbrew?) What if you simply have more perls installed?
I didn’t have an answer.
that’s what my fingers knew. that’s what i typed. that’s all that there was to it.
Turns out, I could have done better. And now I do. Every time you go to write the very first line of a perl script, think of the fellow in the future, maybe you, maybe not. His computer will be different. His OS will be different. Heck, everything about their system layout might be different. Lord knows I’ve seen perl everywhere from /opt to /Library to /usr to ~/. But you know what you can be relatively certain of? Their perl will be called perl… and the environement will know about it.
So stop it with #!/usr/bin/perl. We have a new sherif in town, his name is
I can’t wait for one of you internet folks to tell me why this is dumb, then I’ll tell @spleck right to his dumb face.