> Wiggins,
> 
> just one more thing, how can i get the number of elements from an hash
like this one that i'm
> trying to use?
> 
> > > > > foreach my $keys (keys %{ $printers{jobs} }) {

You can take the list in a scalar context, or force it into a scalar
context, such as,

my $num = keys %{ $printers{jobs} };

or the more verbose,

my $num = scalar keys %{ $printers{jobs} };

'values' works in place of 'keys' since it is a 1-to-1 relationship,
keys is my preferred.

http://danconia.org


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