Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

RE: Question: Array of Hashes
Thanks Offer! It's working!

Wim




-----Original Message-----
From: Offer Kaye [mailto:offer.kaye@gmail.com]
Sent: 31 March 2005 02:55 PM
To: Perl Beginners
Subject: Re: Question: Array of Hashes


On Thu, 31 Mar 2005 14:40:47 +0200, Olivier, Wim W wrote:
> Hi all,
>
> I have the following code below which I need to modify a bit.
>
> The script currently lists the key/value pairs for all processes in the
> system.
> What I need to achieve is for it to only list the key/value pairs for
> processes of which the "Description" key is of a certain ASCII value, say
> "analytics.exe".
>

Untested, but here goes:
foreach my $info (@info)
{
if ($info->{'Description'} eq "analytics.exe")
{
foreach ('ProcessId', 'Description', 'ThreadCount')
{
print "$_ = ", $info->{$_} || '', "\n";
}
print "\n";
}
}

Hope this helps,
--
Offer Kaye

--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
<http://learn.perl.org/> <http://learn.perl.org/first-response>


 ________________________________________
____________________________________
 ________________________________________
______________

Standard Bank Disclaimer and Confidentiality Note

This e-mail, its attachments and any rights attaching hereto are, unless the
 context clearly indicates otherwise, the property of Standard Bank Group Li
mited and/or its subsidiaries ("the Group"). It is confidential, private and
 intended for the addressee
only.

Should you not be the addressee and receive this e-mail by mistake, kindly n
otify the sender, and delete this e-mail, immediately and do not disclose or
 use same in any manner whatsoever.

Views and opinions expressed in this e-mail are those of the sender unless c
learly stated as those of the Group. The Group accepts no liability whatsoev
er for any loss or damages whatsoever and howsoever incurred, or suffered, r
esulting, or arising, from
the use of this email or its attachments.

The Group does not warrant the integrity of this e-mail nor that it is free 
of errors, viruses, interception or interference.

Licensed divisions of the Standard Bank Group are authorised financial servi
ces providers in terms of the Financial Advisory and Intermediary Services A
ct, No 37 of 2002 (FAIS).

For information about the Standard Bank Group Limited visit our website http://www
.standardbank.co.za
 ________________________________________
____________________________________
 ________________________________________
_______________

Report this thread to moderator Post Follow-up to this message
Old Post
Wim W Olivier
03-31-05 08:56 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PERL Beginners archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:01 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.