Re: check for def

2006-12-01 Thread Bill Jones
[sorry for following up my own post] On 12/1/06, Bill Jones <[EMAIL PROTECTED]> wrote: Yes, the 'use CGI' stuff will work even on the command-line (ie, when not used in a CGI/HTTP gateway) environment. A specific example - #! /usr/bin/perl -wT use CGI; use strict; use warnings; use diagnosti

Re: check for def

2006-12-01 Thread Bill Jones
On 12/1/06, David Bear <[EMAIL PROTECTED]> wrote: I would like to do something like (psuedo coded) Whats wrong with what you posted previously? The goal of course is to make sure that %params has some hash table available even if the script is not called in a cgi environment. Any pointers?

Re: check for def

2006-12-01 Thread Mumia W.
On 12/01/2006 01:24 PM, David Bear wrote: I would like to do something like (psuedo coded) my $req = CGI->new(); my %params = $req->Vars; if ndef %params { %params = 'gets a hash time that i build' } The goal of course is to make sure that %params has some hash table available even if the sc

check for def

2006-12-01 Thread David Bear
I would like to do something like (psuedo coded) my $req = CGI->new(); my %params = $req->Vars; if ndef %params { %params = 'gets a hash time that i build' } The goal of course is to make sure that %params has some hash table available even if the script is not called in a cgi environment. An

Re: ways to iterate over params

2006-12-01 Thread David Bear
Bill Jones wrote: > On 11/30/06, David Bear <[EMAIL PROTECTED]> wrote: > >> my $q = CGI->new(); >> my %params = $q->Vars; >> foreach $f (keys (%params)) { >>print "$f is $params{$f} "; >> } > > use CGI; > > my $q = CGI->new(); > my %params = $q->Vars; > foreach my $f (keys (%params)) { >

Re: trouble with meta http-equiv

2006-12-01 Thread David Bear
Wiggins d'Anconia wrote: > David Bear wrote: >> I'm trying to put a client side redirect with http-equiv refresh. I'm >> using the syntax: >> >> my $req = CGI->new(); >> >> print $req->header( "text/html" ); >> print $req->start_html( -head=>meta({-http-equiv => 'refresh', > > In the above lin