LWP

F

freedom

hello

is there anyway to get url whatever the user entered in the field.

example

in the script
instead of

my $url = "http://www.whatever.com";
my $page = get( $url );

how can we get the url without declaring the url in the script.
 
S

Sherm Pendley

freedom said:
is there anyway to get url whatever the user entered in the field.

example

in the script
instead of

my $url = "http://www.whatever.com";
my $page = get( $url );

how can we get the url without declaring the url in the script.

It depends. What kind of field? An HTML form? A Tk interface? Curses,
Gtk, Qt, Cocoa... what?

sherm--
 
S

Sherm Pendley

freedom wrote:

(At the top - please don't do that.)
it is an html form

CGI.pm is the standard way to retrieve the contents of a form that's
been submitted to a CGI script written in Perl. For example, to retrieve
the contents of a form input named "example":

#!/usr/bin/perl

use warnings;
use strict;

use CGI;

my $query = new CGI;
my $example = $query->param('example');

# Obviously you'd want to follow this with some output at
# this point. :)

Have a look at "perldoc CGI" for more.

sherm--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,169
Messages
2,570,920
Members
47,463
Latest member
FinleyMoye

Latest Threads

Top