#!/usr/bin/perl -wT use strict; use CGI; my $q = new CGI; my %Q = $q->Vars(); if(exists $Q{a}) { print "a exists ", (defined $Q{a} )?("and it is"):("but it isn't"), " defined ($Q{a})\n"; } use Data::Dumper; print Dumper \%Q; __END__ F:\>perl -T f a=b a exists and it is defined (b) $VAR1 = { 'a' => 'b' }; F:\>perl -T f a= a exists and it is defined () $VAR1 = { 'a' => '' }; F:\>perl -T f a= a exists and it is defined () $VAR1 = { 'a' => '' }; F:\>perl -T f a $VAR1 = { 'keywords' => 'a' }; F:\>perl -T f a b c d $VAR1 = { 'keywords' => 'a b c d' }; F:\>perl -T f a=b;a=c;a=d; a exists and it is defined (b c d) $VAR1 = { 'a' => 'b c d' }; F:\>
___crazyinsomniac_______________________________________
Disclaimer: Don't blame. It came from inside the void
perl -e "$q=$_;map({chr unpack qq;H*;,$_}split(q;;,q*H*));print;$q/$q;"
In reply to (crazyinsomniac) Re: CGI.pm and blank form fields
by crazyinsomniac
in thread CGI.pm and blank form fields
by cLive ;-)
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |