D
david
Hi all,
I have a script with the following
%a = (foo=>$cgi->param('foo'), boo=>$cgi->param('boo'))
I have a problem if foo was not defined then the cgi thinks that i
want list context and returns an empty array.
then the order of the hash is broken and for $a{foo} i get boo.
one way is to write
%a = (foo=>scalar $cgi->param('foo'), boo=>scalar $cgi->param('boo'))
but this is not elegant.
Has someone a more elegant solution for this problem ?
Thanks in advance,
David
I have a script with the following
%a = (foo=>$cgi->param('foo'), boo=>$cgi->param('boo'))
I have a problem if foo was not defined then the cgi thinks that i
want list context and returns an empty array.
then the order of the hash is broken and for $a{foo} i get boo.
one way is to write
%a = (foo=>scalar $cgi->param('foo'), boo=>scalar $cgi->param('boo'))
but this is not elegant.
Has someone a more elegant solution for this problem ?
Thanks in advance,
David