perl execution ? 
Author Message
 perl execution ?

Can i execute  my perl scripts directly saying 'filename.pl' at the command
prompt w/o saying 'perl filename.pl'

Is there any way? Do changing environment varaible
" PATH" would help.

WhoKnows



Sun, 16 May 2004 23:12:52 GMT  
 perl execution ?

Quote:

>Can i execute  my perl scripts directly saying 'filename.pl' at the command
>prompt w/o saying 'perl filename.pl'

What platform? Because it largely depends on that.

--
        Bart.



Sun, 16 May 2004 23:41:51 GMT  
 perl execution ?


Quote:

> >Can i execute  my perl scripts directly saying 'filename.pl' at the
command
> >prompt w/o saying 'perl filename.pl'

> What platform? Because it largely depends on that.

Apache webserver, OS : red hat linux 6.2
Quote:

> --
> Bart.



Sun, 16 May 2004 23:48:22 GMT  
 perl execution ?

Quote:

> Can i execute  my perl scripts directly saying 'filename.pl' at the command
> prompt w/o saying 'perl filename.pl'

> Is there any way? Do changing environment varaible
> " PATH" would help.

assuming *nix:

make sure your script starts with a shebang line (like #!/usr/bin/perl)
set the execute bit on the script
make sure the script is in your path, or specify the full path to it

--
robert sherman
css3, school of civil and environmental engineering
georgia institute of technology
atlanta, ga, usa



Sun, 16 May 2004 23:55:47 GMT  
 perl execution ?

Quote:

>> >Can i execute  my perl scripts directly saying 'filename.pl' at the
>>command
>> >prompt w/o saying 'perl filename.pl'

>> What platform? Because it largely depends on that.

>Apache webserver, OS : red hat linux 6.2

Ah. Yes you can. Either you add this directory, or "." to your PATH (I
would hesitate to do that), or you use

        ./filename.pl

at the prompt.

Either way, make sure your shebang line (the first line, starts with
"#!") points to the proper perl executable, and set the permissions of
the script to executable for the appropriate people..

--
        Bart.



Mon, 17 May 2004 00:24:21 GMT  
 perl execution ?
On Nov 28, WhoKnows inscribed on the eternal scroll:

Quote:
> > >Can i execute  my perl scripts directly saying 'filename.pl' at the
> command
> > >prompt w/o saying 'perl filename.pl'

> > What platform? Because it largely depends on that.

> Apache webserver,

But you asked about the command prompt, not about the web server
(which makes it sound more like a stealth CGI question).

Can you ask a more precise question?  Let's try taking you at your
word, anyhow, and disregarding the remark about Apache for now.

Quote:
> OS : red hat linux 6.2

In any flavour of unix, the answer (if Perl has been installed in the
normal way) will be "yes".  The reason being that a perl executable
will have been installed into a directory that is normally on your
PATH (to cut a long story short).

If you don't know what that means, then you have some learning to do
about unix-type command prompts - the Perl language group isn't the
place for that - try your redhat tutorials or a general unix manual.

good luck



Mon, 17 May 2004 00:28:45 GMT  
 perl execution ?

Quote:

>In any flavour of unix, the answer (if Perl has been installed in the
>normal way) will be "yes".  The reason being that a perl executable
>will have been installed into a directory that is normally on your
>PATH (to cut a long story short).

???

It's the path to the script that would need to be in the path, provided
it has a proper shebang line (with a full path to perl -- that's why
that one doesn't matter). If not, "./script.pl" would still work, if the
script is in the current directory.

--
        Bart.



Mon, 17 May 2004 00:53:39 GMT  
 perl execution ?
On Nov 28, Bart Lateur inscribed on the eternal scroll:

Quote:

> >In any flavour of unix, the answer (if Perl has been installed in the
> >normal way) will be "yes".  The reason being that a perl executable
> >will have been installed into a directory that is normally on your
> >PATH (to cut a long story short).

> ???

> It's the path to the script that would need to be in the path, provided
> it has a proper shebang line (with a full path to perl -- that's why
> that one doesn't matter).

Good call.  I seem to have offered an answer to the wrong question.

Sorry.



Mon, 17 May 2004 02:21:31 GMT  
 perl execution ?
Thanks Bart,

It worked....

WhoKnows


Quote:

> >In any flavour of unix, the answer (if Perl has been installed in the
> >normal way) will be "yes".  The reason being that a perl executable
> >will have been installed into a directory that is normally on your
> >PATH (to cut a long story short).

> ???

> It's the path to the script that would need to be in the path, provided
> it has a proper shebang line (with a full path to perl -- that's why
> that one doesn't matter). If not, "./script.pl" would still work, if the
> script is in the current directory.

> --
> Bart.



Mon, 17 May 2004 15:20:37 GMT  
 perl execution ?

Quote:

>But you asked about the command prompt, not about the web server
>(which makes it sound more like a stealth CGI question).

I see a lot of responses like this to Perl CGI questions.  I've never
been able to find a reference to explain what 'Stealth CGI' is.  Google
has many unrelated hits -- perldoc CGI doesn't mention stealth.  I've
only seen that expression used on CLPM.

What is this technique that the regulars keep suspecting the newbies of
attempting?

Rich

--

Technical Consultant     | I speak for me,     |   19055 Pruneridge Ave.
Development Alliances Lab|            *not* HP |                MS 46TU2
ESPD / E-Serv. Partner Division +--------------+---- Cupertino, CA 95014



Mon, 07 Jun 2004 22:27:49 GMT  
 perl execution ?


  >>
  >> But you asked about the command prompt, not about the web server
  >> (which makes it sound more like a stealth CGI question).

  RJR> I see a lot of responses like this to Perl CGI questions.  I've never
  RJR> been able to find a reference to explain what 'Stealth CGI' is.  Google
  RJR> has many unrelated hits -- perldoc CGI doesn't mention stealth.  I've
  RJR> only seen that expression used on CLPM.

it is asking a cgi question without stating so publicly, and under the
guise of being a perl question, hence the term 'stealth'. this group is
about perl and not about cgi. so asking a cgi question here is highly
frowned upon and when it is asked steathily, even more so.

uri

--

-- Stem is an Open Source Network Development Toolkit and Application Suite -
----- Stem and Perl Development, Systems Architecture, Design and Coding ----
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org



Mon, 07 Jun 2004 22:59:40 GMT  
 perl execution ?
On Dec 20, Richard J. Rauenzahn inscribed on the eternal scroll:

quite a while back:

Quote:
> >(which makes it sound more like a stealth CGI question).

> I see a lot of responses like this to Perl CGI questions.

Indeed - Google groups shows over a dozen matches of the exact phrase
(not counting the many which made the same point in different words)
on this very group in the last year.  Could it be an FAQ?  (sort of).

Quote:
> I've never
> been able to find a reference to explain what 'Stealth CGI' is.

There's no such thing as "stealth CGI".  It's about a "stealth CGI
question", and that's rather frequent around here.

Perl is a programming language, which is used for many different
purposes.  One of them is CGI.  This group is for discussing Perl
language questions (which might or might not relate to the CGI).  The
comp.infosystems.www.authoring.cgi group (automoderated!) is for
discussing CGI questions (which might or might not be programmed in
Perl).

Quote:
> What is this technique that the regulars keep suspecting the newbies of
> attempting?

Asking questions overtly about Perl, which only turn out on further
investigation to not be about Perl as such (merely that the questioner
happened to be programming in Perl at the time), but in fact are about
the CGI.

As the peer-reviewed FAQ says (for the next release):

 The Common Gateway Interface (CGI) specifies a software interface
 between a program ("CGI script") and a web server (HTTPD). It is not
 specific to Perl, and has its own FAQs and tutorials, and usenet
 group, comp.infosystems.www.authoring.cgi

(see http://cvs.perl.org/cvsweb/perlfaq/perlfaq9.pod rev. 1.5)

[which, as it happens, has my name in the credits, but seems to
express the general feeling of the group.]

best (hoping this wasn't a troll) regards



Mon, 07 Jun 2004 23:10:42 GMT  
 perl execution ?

Quote:

>>But you asked about the command prompt, not about the web server
>>(which makes it sound more like a stealth CGI question).

>I see a lot of responses like this to Perl CGI questions.  I've never
>been able to find a reference to explain what 'Stealth CGI' is.
>What is this technique that the regulars keep suspecting the newbies of
>attempting?

The "normal" or "usual" environment for running Perl programs
is the command line.

If you ask a question, it will be assumed to be in that environment.

If you failed to mention that it is running in a different
environment (CGI), then the answer you get may not be applicable.

"stealth CGI question" means a CGI question where it is not
stated that it is in the CGI environment. Nobody minds or cares
until we are told about the CGI aspect after spending time
giving a perfectly good answer for the "normal" environment.

ie. the OP didn't state something that was essential to getting
    a good answer. Not enough information provided.

--
    Tad McClellan                          SGML consulting

    Fort Worth, Texas



Mon, 07 Jun 2004 23:20:08 GMT  
 perl execution ?


Quote:
>> I've never
>> been able to find a reference to explain what 'Stealth CGI' is.

>There's no such thing as "stealth CGI".  It's about a "stealth CGI
>question", and that's rather frequent around here.

Aha..  a stealth question about CGI not a question about stealth CGI.  I
thought there was some sooper sekret stealthy CGI trick I was missing
out on.

Quote:
>Perl is a programming language, which is used for many different
>purposes.  One of them is CGI.  This group is for discussing Perl
>language questions (which might or might not relate to the CGI).  The
>comp.infosystems.www.authoring.cgi group (automoderated!) is for
>discussing CGI questions (which might or might not be programmed in
>Perl).

Of course.

Quote:
>[which, as it happens, has my name in the credits, but seems to
>express the general feeling of the group.]

>best (hoping this wasn't a troll) regards

Nope!  I promise I'm legit.  In fact, see p. xxxiii of Camel 3.

Rich

--

Technical Consultant     | I speak for me,     |   19055 Pruneridge Ave.
Development Alliances Lab|            *not* HP |                MS 46TU2
ESPD / E-Serv. Partner Division +--------------+---- Cupertino, CA 95014



Tue, 29 Jun 2004 23:19:15 GMT  
 
 [ 14 post ] 

 Relevant Pages 

1. /bin/sh vs. Perl Execution Time

2. Perl execution quesiton...

3. CGI/perl execution problems.....

4. Optimizing Perl execution.

5. perl execution

6. perl execution

7. HELP: Automatic Execution of perl scripts RE: first line of code #!/usr/bin/perl/

8. Execution time in Perl

9. perl script execution take a long time

10. Cache the execution of a Perl CGI?

11. Execution speed of Perl?

 

 
Powered by phpBB® Forum Software