You have it slightly wrong...

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'};



----------------------------------------------------------------------------
--
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient
of
this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information
is
complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.


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

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

Reply via email to