On Apr 8, 2004, at 12:03 PM, Dermot Paikkos wrote:

Hi,

I have written something in ModPerl (extremely proud of myself) but
have hit a snag. The program returns the input from a form.
Unfortunately I can't post a url to the form. The form has ten
sections, each section is a story synopsis. Within each story are 5
fields. I gather all the form data into a hash but once I have done
that I don't know how to find out how many stories I have.

I tried $num = %hash and this gave me "38/64" which I can't make
sense of.
$num = values(%hash) gives me the total number of fields (50) and
@num = values(%hash) seems to pour everything into the somewhere in
@num but I can't see to untangle it (I can't see anything in
$num[0]).

Can anyone help??

Sure:


my $count = keys %hash;

James


-- 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