Joseph L. Casale wrote:
The first hash has several entities, one of which is 'object'. Inside
this hash, I have several other hashes, all of which are actually
named '0' and up.
I guess I overlooked just iterating through that second hash.
I am now stuck in leveraging those hashes as the synt
ED] On Behalf Of Tom Phoenix
Sent: October-19-07 3:32 PM
To: Joseph L. Casale
Cc: beginners@perl.org
Subject: Size of a hash
On 10/19/07, Joseph L. Casale <[EMAIL PROTECTED]> wrote:
> Is there a way to compute the size of a hash?
Yes; use the keys() function in a scalar context to get the
On 10/19/07, Joseph L. Casale <[EMAIL PROTECTED]> wrote:
> Is there a way to compute the size of a hash?
Yes; use the keys() function in a scalar context to get the number of
key-value pairs in the hash.
my $count = keys %hash;
> I have a hash of hashes of hashes etc... and need
Dermot Paikkos wrote:
>
> I have written something in ModPerl (extremely proud of myself)
[and stuff]
Well done Dermot. Writing functional code and being proud of it
is about 88% of the job.
Rob
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Apr 8, 2004, at 12:44 PM, Dermot Paikkos wrote:
Got it:
if ($r->param("$param") ne "" ) {
That works.
if (length $r->param($param)) {
should also work.
Note: I don't quote the variable name. It's not needed.
I was suggesting just dropping defined():
if ($r->param($param)) {
That probab
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
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_he
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 poss
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 value
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
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 d
11 matches
Mail list logo