I don't want each of my CGI scripts to have
#!/usr/bin/perl -wT
at the top. I want this automatically done somehow. How can I do this?
I'm not clear on which of several problems you're trying to solve, so I'll assume that you don't want to hard-code the path in scripts that you intend to distribute, where they might break if they're installed on a box where Perl lives somewhere else.
The common way I see people addressing this is by writing an install script that first finds (or guesses, or asks for) the path to Perl, and then fixes up the #! line on each executable script component.
A alternate trick from the path-less-traveled is to use
#!./perl -wT
then make a symbolic link the proper perl executable. This doesn't work for CGIs on Win32, but then neither does -T in the #! line. Some will consider this approach less than wise.
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.