Great Circle Associates Majordomo-Users
(April 1995)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: simple question about the perl scripts
From: Larry Sheldon <lsheldon @ creighton . edu>
Date: Fri, 7 Apr 95 20:07:37 CDT
To: mcollins @ lnd . state . az . us (Micheal Collins Intern) (Micheal Collins Intern)
Cc: majordomo-users @ GreatCircle . COM
In-reply-to: <9504072214.AA01964@lnd.state.az.us>; from "Micheal Collins Intern" at Apr 7, 95 3:14 pm
Mailer: Elm [revision: 70.85.2.1]

Mike said?
> Hello-
> 
> As a newbie to perl I have a very simple question about the #! lines of perl
> scripts in majordomo.
> 
> Does what follows the #! need to be the location of the perl executable
> such as /usr/local/bin/perl or the location of the perl (.pl) files which is
> somewhere else in a /lib directory. Also do files such as majordomo.pl need
> this line (#!...etc.) as the first string, or only the executables such as
> wrapper and resend?
> 
> Sorry for such a simple question but our sys. admin. is on vacation.

Ours is even when he is here.

I think the answer to your question is:

The current shell reads the first line of an executable script, and finding
the sharp-bang, interprets what follows as the name of the "shell" to 
called to run the rest of the script.

If what follows the sharp-bang is not the name of a "shell" the line
is interpretd as a comment, as lines beginning with a sharp are supposed
to be.

The seems to be some disagreement as to whether white-space between the
bang and the shell name causes the line to be taken to be a comment or
not.

You didn't ask, but I'll tell you that if the "shell" takes command-line
arguments, anything to the right of the shell-name will be passed as
command-line arguments.
--
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
.                                                                       .
- L. F. (Larry) Sheldon, Jr.                                            -
. Unix Systems and Network Administration                               .
- Creighton University Computer Center-Old Gym                          -
. 2500 California Plaza                                                 .
- Omaha, Nebraska, U.S.A.  68178       We are all faced with            -
. lsheldon@creighton.edu                  great opportunities           .
- 402 280-2254 (work)                  brilliantly disguised as         -
. 402 681-4726 (cellular)                 impossible situations.        .
- 402 977-2946 (pager)                                                  -
. 402 332-4622 (residence)                  Bits and Pieces             .
-                                                                       -
.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.


References:
Indexed By Date Previous: Re: simple question about the perl scripts
From: Dave Brookshire <david@irc.umbc.edu>
Next: Re: perl questions
From: jallen@ingress.com (Jay Andrew Allen)
Indexed By Thread Previous: Re: simple question about the perl scripts
From: Dave Brookshire <david@irc.umbc.edu>
Next: Re: perl questions
From: jallen@ingress.com (Jay Andrew Allen)

Google
 
Search Internet Search www.greatcircle.com