Run perl script on web server from command line 
Author Message
 Run perl script on web server from command line

I have a perl script on a web server which can of course be executed from a
web browser.

i.e. http://www.*-*-*.com/

Is there any way I can execute this script from a Windows 2000 command line
instead of going through the browser ?

Thanks



Sun, 27 Mar 2005 19:29:48 GMT  
 Run perl script on web server from command line

Quote:
> I have a perl script on a web server which can of course be executed from
a
> web browser.

> i.e. http://www.my.server/scripts/myperl.pl

> Is there any way I can execute this script from a Windows 2000 command
line
> instead of going through the browser ?

1. Download and install IndigoPerl, available free from www.indigostar.com

or

2. Download and install Activeperl, available from www.activestate.com

download link:
http://www.activestate.com/Products/Download/Download.plex?id=ActivePerl

Bill Segraves



Sun, 27 Mar 2005 20:25:58 GMT  
 Run perl script on web server from command line

Quote:

> I have a perl script on a web server which can of course be executed from a
> web browser.

> i.e. http://www.my.server/scripts/myperl.pl

> Is there any way I can execute this script from a Windows 2000 command line
> instead of going through the browser ?

If you are using CGI.pm (and you should be), you can execute it from teh
command line simply:

C:> myperl.pl

See the CGI.pm docs for details on entering form data.

Cameron

--
Cameron Dorey
Associate Professor of Chemistry
University of Central Arkansas
Phone: 501-450-5938



Sun, 27 Mar 2005 20:49:45 GMT  
 Run perl script on web server from command line
I already have Active Perl.  I know that I can execute a script that is
running on the local computer (i.e. perl c:\myperl.pl).  What I want to do
is execute a script that is on a remote web server.  I would normally do it
from the web browser but I want to be able to do it from a command line.

thanks



Quote:


> > I have a perl script on a web server which can of course be executed
from
> a
> > web browser.

> > i.e. http://www.my.server/scripts/myperl.pl

> > Is there any way I can execute this script from a Windows 2000 command
> line
> > instead of going through the browser ?

> 1. Download and install IndigoPerl, available free from www.indigostar.com

> or

> 2. Download and install Activeperl, available from www.activestate.com

> download link:
> http://www.activestate.com/Products/Download/Download.plex?id=ActivePerl

> Bill Segraves



Sun, 27 Mar 2005 20:51:44 GMT  
 Run perl script on web server from command line

Quote:
> I have a perl script on a web server which can of course be executed from
a
> web browser.

> i.e. http://www.my.server/scripts/myperl.pl

> Is there any way I can execute this script from a Windows 2000 command
line
> instead of going through the browser ?

Clarification:

Your question is not really a perl programming question; so it is probably
off-topic for this newsgroup.

On re-reading your question, however, if I interpret your question
literally, I see you may be trying to execute the script on the computer
that is the host of the web server. Try the following:

1. Establish a telnet session on the computer that is hosting the web
server.

2. Navigate to the directory where your scripts are stored.

3. Type "perl myperl.pl" at the command prompt of the telnet session.

In my previous response, telnet is not required, as the contemplated action
applied to execution of the script on the client computer, which requires
Perl to be installed on the client computer.

Bill Segraves



Sun, 27 Mar 2005 21:27:08 GMT  
 Run perl script on web server from command line
Thanks for your suggestion but I will also need to automate it so a one-step
procedure is needed.  Could a perl script on the local computer be written
to execute the script on the remote web server?

Thanks



Quote:


> > I have a perl script on a web server which can of course be executed
from
> a
> > web browser.

> > i.e. http://www.my.server/scripts/myperl.pl

> > Is there any way I can execute this script from a Windows 2000 command
> line
> > instead of going through the browser ?

> Clarification:

> Your question is not really a perl programming question; so it is probably
> off-topic for this newsgroup.

> On re-reading your question, however, if I interpret your question
> literally, I see you may be trying to execute the script on the computer
> that is the host of the web server. Try the following:

> 1. Establish a telnet session on the computer that is hosting the web
> server.

> 2. Navigate to the directory where your scripts are stored.

> 3. Type "perl myperl.pl" at the command prompt of the telnet session.

> In my previous response, telnet is not required, as the contemplated
action
> applied to execution of the script on the client computer, which requires
> Perl to be installed on the client computer.

> Bill Segraves



Sun, 27 Mar 2005 22:54:53 GMT  
 Run perl script on web server from command line

Quote:

> I know that I can execute a script that is
> running on the local computer (i.e. perl c:\myperl.pl).  

If you have telnet access to a remote computer's command line,
then you would start it similarly (perhaps adjusting for the OS).

Quote:
> What I want to do
> is execute a script that is on a remote web server.  I would normally do it
> from the web browser but I want to be able to do it from a command line.

You want to write a Perl program that "looks like" a browser
when viewed by the web server?

There is only one answer to that, use the LWP module.

   http://search.cpan.org/author/GAAS/libwww-perl-5.65/lib/LWP.pm

[snip upside-down quoted text. Please do not do that.]

--
    Tad McClellan                          SGML consulting

    Fort Worth, Texas



Sun, 27 Mar 2005 23:08:04 GMT  
 Run perl script on web server from command line

Quote:
> Thanks for your suggestion but I will also need to automate it so a
one-step
> procedure is needed.  Could a perl script on the local computer be written
> to execute the script on the remote web server?

NO, "perl" is the name of the executable program. I think you mean "Perl
script, in which case the answer is "Yes".

Please don't top post to this newsgroup.

Yes. Hint: Read the documentation for Net::Telnet and Net::SSH::Perl at
ActiveState.com. http://aspn.activestate.com/ASPN/Modules

BTW, you stated earlier (using another identity) that you already have
Activre State Perl. Didn't you check the docs to see if you could find the
answer to your questions? Also, you'd get higher quality answers if you'd
ask your _real_ question in your first post.

Given the zeal with which the regulars on this newsgroup expect you to read
and observe the posting guidelines, I'm surprised you haven't already found
the answer to your own question.

Bill Segraves



Mon, 28 Mar 2005 01:35:18 GMT  
 Run perl script on web server from command line
Thanks.  The sample Perl script on that page did the trick.

Chuck


Quote:

> > I know that I can execute a script that is
> > running on the local computer (i.e. perl c:\myperl.pl).

> If you have telnet access to a remote computer's command line,
> then you would start it similarly (perhaps adjusting for the OS).

> > What I want to do
> > is execute a script that is on a remote web server.  I would normally do
it
> > from the web browser but I want to be able to do it from a command line.

> You want to write a Perl program that "looks like" a browser
> when viewed by the web server?

> There is only one answer to that, use the LWP module.

>    http://search.cpan.org/author/GAAS/libwww-perl-5.65/lib/LWP.pm

> [snip upside-down quoted text. Please do not do that.]

> --
>     Tad McClellan                          SGML consulting

>     Fort Worth, Texas



Mon, 28 Mar 2005 02:27:00 GMT  
 Run perl script on web server from command line

Quote:
> NO, "perl" is the name of the executable program. I think you mean "Perl
> script, in which case the answer is "Yes".

Isn't that what I said!

Quote:
> BTW, you stated earlier (using another identity) that you already have
> Activre State Perl. Didn't you check the docs to see if you could find the
> answer to your questions? Also, you'd get higher quality answers if you'd
> ask your _real_ question in your first post.

Next time I'll make sure to be more thorough when posting a question.  I'll
also make sure that the identities are the same.  I posted from two
different computers and my news reader was obviously configured differently.
In any case thanks for your input.

Chuck



Mon, 28 Mar 2005 02:35:23 GMT  
 Run perl script on web server from command line

<snip>
Quote:

> Next time I'll make sure to be more thorough when posting a question.

<snip>

That would be helpful, especially to you.. You received several different
answers to your questions because you were not precise about the type of
transaction you wished to perform with the remote computer you described as
your web server, e.g.,

1. Tad McClellan pointed you towards the LWP module, which is the correct
response if you wish to perform "HTTP-style communication" from the command
line of your (client) computer. In this case, your script interacts with the
web _server_ running on the remote computer.

2. I directed you to Net::Telnet (or Net::SSH::Perl), which might be
appropriate if you wish to perform "Telnet-style (secure) communication"
from the command line of your (client) computer.

3. There are other alternatives to 1 and 2 above, e.g., VNC.

Whether you choose HTTP-type or Telnet-type transactions depends upon
factors you have not stated in your previous posts.

Quote:
> In any case thanks for your input.

You're very welcome!

Bill Segraves



Mon, 28 Mar 2005 04:13:48 GMT  
 Run perl script on web server from command line

Quote:


>> [snip upside-down quoted text. Please do not do that.]

On Wed, 9 Oct 2002 21:27:00 -0400, "Chuck"

Quote:

>Thanks.  The sample Perl script on that page did the trick.

Which part exactly of Tad's:

"snip upside-down quoted text. Please do not do that."

did you not understand, Chuck?

--
Regards, Helgi Briem
helgi AT decode DOT is

                           A: Top posting
                           Q: What is the most irritating thing on Usenet?
                                           - "Gordon" on apihna



Mon, 28 Mar 2005 11:50:58 GMT  
 Run perl script on web server from command line

Quote:
> >> [snip upside-down quoted text. Please do not do that.]

> Which part exactly of Tad's:

> "snip upside-down quoted text. Please do not do that."

> did you not understand, Chuck?

> --
> Regards, Helgi Briem
> helgi AT decode DOT is

In the immortal words of Maxwell Smart, the part that came after "[".

Have a nice day, Helgi



Mon, 28 Mar 2005 15:50:51 GMT  
 Run perl script on web server from command line
On Thu, 10 Oct 2002 10:50:51 -0400, "Chuck"

Quote:

>> >> [snip upside-down quoted text. Please do not do that.]

>> Which part exactly of Tad's:
>> "snip upside-down quoted text. Please do not do that."
>> did you not understand, Chuck?
>In the immortal words of Maxwell Smart, the part that came after "[".
>Have a nice day, Helgi

I will and it was jsut made nicer by having a suggestion
actually listened to and acted upon for a change.  

Thanks and good luck.  We'll be seeing you around again,
I hope.
--
Regards, Helgi Briem
helgi AT decode DOT is

                           A: Top posting
                           Q: What is the most irritating thing on Usenet?
                                           - "Gordon" on apihna



Mon, 28 Mar 2005 17:02:19 GMT  
 Run perl script on web server from command line

Quote:

>> >> [snip upside-down quoted text. Please do not do that.]

>> Which part exactly of Tad's:

>> "snip upside-down quoted text. Please do not do that."

>> did you not understand, Chuck?

>> --
>> Regards, Helgi Briem
>> helgi AT decode DOT is

Now we can work of full-quoting.

Please do not quote .sigs

Quote:
> In the immortal words of Maxwell Smart, the part that came after "[".

(wrapped)

   http://mail.augustmail.com/~tadmc/clpmisc/
     clpmisc_guidelines.html#item_Use_an_effective_followup_style

--
    Tad McClellan                          SGML consulting

    Fort Worth, Texas



Mon, 28 Mar 2005 17:36:01 GMT  
 
 [ 16 post ]  Go to page: [1] [2]

 Relevant Pages 

1. perl script for calling a java program,running the script through cgi of the web server

2. difference between running perl from command line and web

3. perl program works on command line, but not when run through www server

4. different behaviour when running from web and command line

5. Newbie needs help- trying to submit command-line function to perl script via web

6. apache web server set up problems running perl cgi scripts

7. Not being able to run perl script on WinNt using Peer Web Server

8. Server side includes to run Perl scripts from web pages

9. Perl for WIN32 - Can't Run Scripts From Web Server

10. Can't run perl-scripts from MS personal web server

11. need a web server program to run/test cgi scripts in perl on a PC --Windows95

12. running perl at command line with arguments: script.cgi?text=text

 

 
Powered by phpBB® Forum Software