>>>>> "David" == David Labatte <[EMAIL PROTECTED]> writes:

David> The why though is most likely that: undef ne ''

That's not true.  undef eq ''.

David> What I usually do if I have code that expects an empty string
David> instead of an undef is append an empty string onto it when I read
David> the cgi.pm value into it.

David>     $formdata{view_name} = $query->param('view_name') . '';

David> That way undefined form elements have a consistent value and
David> it's easy to just send them back out to the user if I have to
David> without mangling them for display.

This is voodoo programming.  You must've had some problem that this
appeared to solve at some point, but it isn't needed for what you are
answering here, so I don't know how that can help.

undef acts for all intents and purposes the same as an empty string.
If you have warnings on, you'll get messages when you use it as an
empty string, but you would have got a message on that first
concatenate as well.

So, please don't further this mistaken impression, and for the
onlookers, please ignore this advice... it's unfounded.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

Reply via email to