Got it:
if ($r->param("$param") ne "" ) {
....
$num is now 10 and that right (only 2 stories this time).
Thanx v.much for your time.
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>