On Wednesday 24 July 2002 19:48, Aidas Kasparas wrote:

> You can not directly. Empty string and undef are identical for perl.

sorry, but this is wrong. "" is not the same as undef. The following 
expressions are true:

my $empty = ""; my $undef;

$empty eq $undef (but issues a warning if -w is used)
$empty == $undef (dito)
defined $empty

But these return false:

defined $undef
$undef
$empty

(see also perldoc -f defined, perldoc -f exists)

> You could use following perl code:
>
> if (exists ${$cgi->param}{foo}) { ....

A 'defined' test would suffice. But 'exists' is fine, too, of course. "defined 
<param:foo/>" could or could not work, depending on how the param taglib is 
written. (it should work, I believe)

CU
J�rg

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to