[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] module for mimicking netscape . . .



dfield@biomail.ucsd.edu, mac-perl@iis.ee.ethz.ch
Subj:	Re: [MacPerl] module for mimicking netscape . . .

Dawn Field wrote:

> I need a module for MACPERL that will open a connection to a URL and talk
> to a CGI script.  It must be out there somewhere. . . .!
> 
> I have postclient.pl, a script which works on unix to open a socket connect
> with a remote URL, but I don't see how it's possible to make this script to
> work on a mac . . . For one thing, it takes a system call from another
> script to pass in the variables for starting the connect, and as I
> understand it, system calls don't work in MACPERL.  
> 
> I'm just starting with MACPERL so all advice is welcome and nothing is to
> simple not to point it out.
> 

Something _like_ this might help:

   #!/usr/local/bin/perl

   use LWP::Simple;

   @return = get('http://your.server.com/cgi-bin/script?args');

   open(F,">script_return") or die "could not open script_return $!";
   print(F,@return);
   close(F);
   __END__

More information can be found in Clinton Wong's book:

  http://www.oreilly.com/catalog/webclient/

Hope that helps.

Peter Prymmer


***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch