On Sat, 02 Oct 2004 01:46:01 -0700, John W. Krahn <[EMAIL PROTECTED]> wrote:
there is an extra $ in there, it should be:
67: delete $HoH->{ $k } if keys %{ $HoH->{ $k } } < $limit;
Thanks a lot John.
Now it's ok.
RegardS,
Edward WIJAYA
SINGAPORE
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
Edward Wijaya wrote:
On Fri, 01 Oct 2004 08:58:44 -0700, John W. Krahn <[EMAIL PROTECTED]> wrote:
Since $HoH now contains a reference to a hash you have to dereference
it properly.
delete $HoH->{ $k } if keys %${ $HoH->{ $k } } < $limit;
return %$HoH;
I apologize for insisting John.
On Fri, 01 Oct 2004 08:58:44 -0700, John W. Krahn <[EMAIL PROTECTED]> wrote:
Since $HoH now contains a reference to a hash you have to dereference it
properly.
delete $HoH->{ $k } if keys %${ $HoH->{ $k } } < $limit;
return %$HoH;
I apologize for insisting John.
Tried as you sugges
Edward Wijaya wrote:
On Fri, 01 Oct 2004 07:41:43 -0700, John W. Krahn <[EMAIL PROTECTED]> wrote:
Either put the scalar first in the list or pass a reference to the
original hash.
Now, I also tried with pass by reference
my ($HoH,$limit) = @_;
foreach my $k ( keys %$HoH ) {
On Fri, 01 Oct 2004 07:41:43 -0700, John W. Krahn <[EMAIL PROTECTED]> wrote:
Thanks,
No need for $count or the second for loop:
John, your one-liner certainly makes my sub
looks better.
Either put the scalar first in the list or pass a reference to the
original hash.
Now, I also tried with pass b
Edward Wijaya wrote:
Dear Sirs,
I have the following code, that
take Hash of Hash as an iput.
Then I have function (see below) that takes
a hash and a variable as input.
This function will count the elements
of secondary hashes and delete the hash,
if it is below certain variable limit.
So with thi
> Dear Sirs,
>
> I have the following code, that
> take Hash of Hash as an iput.
>
> Then I have function (see below) that takes
> a hash and a variable as input.
> This function will count the elements
> of secondary hashes and delete the hash,
> if it is below certain variable limit.
>
> So wi
Dear Sirs,
I have the following code, that
take Hash of Hash as an iput.
Then I have function (see below) that takes
a hash and a variable as input.
This function will count the elements
of secondary hashes and delete the hash,
if it is below certain variable limit.
So with this :
my %new_hoh = red