It's often called the shebang line, and is mostly used on unix systems to tell the shell where it should look for the perl binary. Windows doesn't use this mechanism to find the binary, so that use is mute.
However, if the line is present, perl will inspect it and respect (some of) the runtime switches (see Perlrun).
I use it as a "reminder" for switches that I have permenantly enabled through the assoc/ftype mechanism (-sw) --mostly so people can see what I use when I post code.
I also use it to enabled individual switches on a case by case basis. The most frequent one being -l as it save me having to add "\n" to the end of every print line. Of course, there are times when you don't want a newline printed, in which case I just use printf $string; instead. Works for me:)
Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller
If I understand your problem, I can solve it! Of course, the same can be said for you.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.