in reply to Passing Hashes
#!/usr/bin/perl use fetcher; use strict; print "Content-type: text/html\n\n"; my $dat; if($ENV{'CONTENT_LENGTH'} !=0) { $dat = fetcher->gather(); foreach(keys %dat) { print "$_ = $dat{$_}<br>\n"; } } print <<endofhtml; <form action="index.cgi" method="post"> <input type="text" name="b1"><input type="text" name="b2"> <input type="submit"> </form> endofhtml
package fetcher; sub gather { my %tmp; $tmp{'name'} = "ironcom"; $tmp{'pwd'} = "pwd"; return \%tmp; } 1;
HASH(0x8230e2c) =
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Passing Hashes
by Joost (Canon) on Oct 24, 2004 at 00:47 UTC | |
|
Re^2: Passing Hashes
by Fletch (Bishop) on Oct 24, 2004 at 00:40 UTC | |
|
Re^2: Passing Hashes
by TheEnigma (Pilgrim) on Oct 24, 2004 at 00:51 UTC |