Hi there - I'm on both both perl lists so I'll save you repost

To call a script from a webpage you just have to link to that script with
the anchor tag
eg:

<a href="myscript.cgi">link here</a>

this will call the script

to pass variables into the script you can use web forms

eg:

<form action="myscript.cgi" method="post">
<input type="text" name="input">
<input type="submit" value="submit">
</form>

the cgi script at the other end should have cgi.pm or cgi-lib.pm included.

eg:

#!/usr/bin/perl -w                       ###path to perl on the server

use CGI qw(:all);                       ###include the cgi module

$output = param("input");         ####parse input from form and
                                                    ####pass to a variable
called $output
                                                    ####note input is the
same as the name
                                                    ####of the text input in
the form

print header;                                ####print standard text/html
header

print <<endofhtm;

<html>                                            #####start printing html
<head>
</head>
<body>

print $output;                                    #####print the value of
$output

</body>
</html>

endofhtm                                            ####stop printing html


If you are uploading via ftp - be sure to upload in ascii format and also
make sure that the file is executable on unix systems (chmod 755 will work
for this script).

If my code sucks guys then please bear in mind that I'm just a newbie too
and please correct any errors :)

cheers

Rick

----- Original Message -----
From: "John Edwards" <[EMAIL PROTECTED]>
To: "'Rahul Garg'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, July 09, 2001 1:41 PM
Subject: RE: HTML and PERL Queries


> You need to subscribe to the beginners-cgi mailing list.
>
> You can do that on this page http://learn.perl.org
>
> John
>
> -----Original Message-----
> From: Rahul Garg [mailto:[EMAIL PROTECTED]]
> Sent: 09 July 2001 13:32
> To: [EMAIL PROTECTED]
> Subject: HTML and PERL Queries
>
>
> Hello,
>
> Well again some biggeners Q.
> 1.How do I call a perlscript from a HTML page.
> 2. Whats the way  to fetch values from page and put again same values on
> HTML depending on the results of perlscript(dynamically).
>
> Can u give some references or perlscript examples regarding above.
> Help!!
>
>
> --------------------------Confidentiality--------------------------.
> This E-mail is confidential.  It should not be read, copied, disclosed or
> used by any person other than the intended recipient.  Unauthorised use,
> disclosure or copying by whatever medium is strictly prohibited and may be
> unlawful.  If you have received this E-mail in error please contact the
> sender immediately and delete the E-mail from your system.
>
>

Reply via email to