You are right on the money. I am getting empty strings:

$hash{a1_head} => This is my first headline
$hash{a1_des} => This is my first description
$hash{a1_spllink} => This is my first SPL link
$hash{a1_storyfrom} => The New Scientist
$hash{a1_storylink} => http://www.newsciencetist.com
$hash{a2_head} => This is my second headline
$hash{a2_des} => This is my second description
$hash{a2_spllink} => This is my second SPL link
$hash{a2_storyfrom} => The Lancet
$hash{a2_storylink} => http://www.thelancet.com
$hash{a3_head} =>
$hash{a3_des} =>
$hash{a3_spllink} =>
$hash{a3_storyfrom} =>
...snip

but how do I test for truth?
Thanx.
Dp.



On 8 Apr 2004 at 12:33, James Edward Gray II wrote:


> On Apr 8, 2004, at 12:23 PM, Dermot Paikkos wrote:
> 
> > That's gives me all the keys (50) and I have only filled in three
> > stories. I would expect to get 30 in that case but something isn't
> > quite right at 'if (defined($r->param...' because both keys and
> > vaules return 50 which is the total number of possible fields and
> > not simply the ones with a values.
> 
> Try removing the call to defined() and just testing to see if the
> value is true.  Or perhaps check for some length().  I suspect you are
> getting empty strings ( '' ), which are, of course, defined().
> 
> James
> 
> 


~~
Dermot Paikkos * [EMAIL PROTECTED]
Network Administrator @ Science Photo Library
Phone: 0207 432 1100 * Fax: 0207 286 8668


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to