perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Perrin Harkins" <per...@elem.com>
Subject Re: passing CGI paramters
Date Wed, 04 Jul 2007 02:59:00 GMT
[Please keep it on the list]

On 7/3/07, Craig Tussey <ct8638@yahoo.com> wrote:
> Thanks again for responding.  Here is the link to my
> scratchpad.   Keep in mind that I was making entries
> to the scratchpad in response to Clintons questions.
>
> http://www.perlmonks.org/?viewmode=public;node_id=624649

Okay, you really aren't showing much code here.  From what you did
show, I'm guessing you're doing this:

my $govlevel = $page->param("str");
print_html();

sub print_html {
    print "blah blah $govlevel blah blah";
}

That doesn't work because the sub becomes a closure and never notices
when you create new versions of $govlevel.  The fix is to pass
$govlevel to the sub as a parameter.

- Perrin

Mime
View raw message