You can do a schwartzian transform
@hosts = (blah..blah..blah);
my @sorted =
map { $_->[0] }
sort { $a->[1] cmp $b->[1] }
map { [$_,$_->{name} }
@hosts;
foreach my $h (@sorted) {
foreac
I have a data structure similar to the following:
@hosts = ( list of hashes like below ... );
%hosts = ( name => "hostname",
ipaddr => "www.xxx.yyy.zzz",
location => "location"
);
How can produce a sorted list of the hashes based on the hostname and then
acce
inal Message-
From: Bradley Wendelboe [mailto:[EMAIL PROTECTED]]
Sent: 01 August 2001 17:35
To: 'John Edwards'; [EMAIL PROTECTED]
Subject: RE: Trying to create array of hashes
The command generates multiple 'records'. Each one of these 'records' are
divided by
IL PROTECTED]]
Sent: Wednesday, August 01, 2001 11:30 AM
To: 'Bradley Wendelboe'; [EMAIL PROTECTED]
Subject: RE: Trying to create array of hashes
This should get you started. You don't mention how you are collecting you
inital data. Do you run a command several times with different
. How to do an array of
hashes depends on the above
---
@data = ("object manager name: snmpCollect",
"state: RUNNING",
"PID: 463",
"last message:Initialization complete.",
"ex
Hello,
I'm trying to capture the output from a command a slice and dice it into an
array of hashes. The data looks like this:
object manager name: snmpCollect
state: RUNNING
PID: 463
last message:Initialization complete.
exit status: -
o
On Tue, Jul 31, 2001 at 05:34:39PM -0500, Chris Garringer wrote:
> I have a program that has an array of days of the month, the array value
> $is a hash, the value of the hash is a hash, and its value is an array
> $logs[$day]{}{}[]
[snip]
> Can someone show me how I can print this out?
Why are y
I think that is right, I admit that Perl's data structures confuse me and I don' t
have it right yet.
I have a program that has an array of days of the month, the array value is a hash,
the value of the hash is a hash, and its value is an array
$logs[$day]{}{}[]
This structure works fine to loa
On Fri, Jun 01, 2001 at 03:29:43PM -0700, Chuck Ivy wrote:
> First post, quick question:
>
> I've got an array of hashes that I'm defining the most basic way I can...
>
> my $gSeasonID;
> my @season_list = '';
> while (@fields = $sth->fetc
On Fri, Jun 01, 2001 at 03:29:43PM -0700, Chuck Ivy wrote:
> First post, quick question:
>
> I've got an array of hashes that I'm defining the most basic way I can...
>
> my $gSeasonID;
> my @season_list = '';
> while (@fields = $sth->fetc
This can be corrected by writing you
sql like this (please adjust for your flavor of sql):
select a.id, b.name as b_name, a.name as a_name
from tab1 a, tab2 b
where a.id = b.id;
On 01 Jun 2001 15:29:43 -0700, Chuck Ivy wrote:
> First post, quick question:
>
> I've got an arr
First post, quick question:
I've got an array of hashes that I'm defining the most basic way I can...
my $gSeasonID;
my @season_list = '';
while (@fields = $sth->fetchrow_array) {
$gSeasonID = $fields[0];
$season_list[$gSeasonID]{number} = $fields[1
101 - 112 of 112 matches
Mail list logo