Hanson, Rob wrote:
> You have it slightly wrong...
> 
> print $hashref{'disks'}->{'io'};

Nope. That references a member of the %hashref hash. He wants

   print $hashref->{disks}{io};

> 
> ...And the quotes are optional (usually)...
> 
> print $hashref{disks}->{io};
> 
> > Is there a more generic mailing list
> > for the different perl modules?
> 
> Thare are other lists/newsgroups, but most are geared to specific port
> (ActiveState), or modules (Tk).  This is a good list for any
> beginner(ish) question, no matter the subject... just as long as it
> is a 
> Perl question.
> 
> Rob
> 
> -----Original Message-----
> From: Li, Kit-Wing [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 09, 2003 2:40 PM
> To: cgi cgi-list
> Subject: accessing a hash map...
> 
> 
> This may not be the right thread but I'd like to see if
> someone could point
> me to the right direction.  I'm writing a CGI script to show current
> performance of the Apache server and I'm using Linux::stat to
> get the disk
> IO for example.  I can seem to access the value of the hash
> reference(see below).  Does anybody have any thoughts?  Is there a
> more 
> generic mailing
> list for the different perl modules?  I know there's the
> mod_perl thread but
> its more for Apache.  Any help will be greatly appreciated.  Thanks!
> 
> use Data::VarPrint;
> use Linux::stat;
> 
> my $stat = Linux::stat->new( [ stat => "path to /proc/stat" ] );
> my $hashref = $stat->stat();
> 
> print $hashref{'disks'}=>{'io'};

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to