On 17 Mar 99, at 10:15, Kayla Block wrote:
> I haven't written a cgi script in well over a year and I'm really rusty. I
> remember I used to know some way to get the output of a perl cgi to print
> to the terminal. This was invaluable for debugging, but I can't recall how
> to do this. I'd also like to be able to get my variable values to print
> out to the terminal.
I highly suggest you use CGI.pm. My example is with it (I also
highly suggest an OO approach).
$q = CGI->new();
my @keys = $q->param;
foreach my $key (@keys) {
print "$key: $v<br>\n" if $debug ==1;
$f{$key} = "$v";
}
and just set debug to 1. Or perhaps just assign a value to debug and
then you don't need the '=='. I also use that routine to strip
newlines and other things.
Peter
Might is not Right. But there is a lot of Might knocking
about in this world, and something has to be done about it.
-- King Arthur, The Once and Future King
____________________________________________________________________
--------------------------------------------------------------------
Join The NEW Web Consultants Association FORUMS and CHAT:
Register Today at: http://just4u.com/forums/
Web Consultants Web Site : http://just4u.com/webconsultants
Give the Gift of Life This Year...
Just4U Stop Smoking Support forum - helping smokers for
over three years-tell a friend: http://just4u.com/forums/
To get 500 Banner Ads for FREE
go to http://www.linkbuddies.com/start.go?id=111261
---------------------------------------------------------------------