Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Re: How do i refresh a page from the perl script.

by epoptai (Curate)
on Jul 02, 2001 at 23:14 UTC ( #93286=note: print w/replies, xml ) Need Help??

in reply to Re: How do i refresh a page from the perl script.
in thread How do i refresh a page from the perl script.

With -w enabled you can't use params like that without getting uninitialized value warnings when the params aren't defined. Also $q->param{'Address'} shouldn't have curly braces but parentheses: $q->param('Address').

This version shows a way to properly initialize the variables whether the params exist or not.

#!/usr/local/bin/perl -w use strict; use CGI; my $q = CGI::new(); my $name = $q->param('Name') || ''; my $addy = $q->param('Address') || ''; print $q->header; print <<HTML; <form> Name: <input type="text" name="Name" value="$name"> Address: <input type="text" name="Address" value="$addy"> <input type="submit" value="Refresh"> </form> HTML

Check out my Perlmonks Related Scripts like framechat, reputer, and xNN.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://93286]
[shmem]: hmm module takeover... any hints? I'm being lazy wrt searches
[choroba]: Contact the author, ask other to help contacting the author, write to pause admins
[shmem]: ah perlfaq7
[shmem]: thanks choroba, found it. 'Tis about MJD Devel::Trace
[shmem]: I'd like to upload a v0.13

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (10)
As of 2018-02-23 14:47 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (302 votes). Check out past polls.