wishartz has asked for the wisdom of the Perl Monks concerning the following question:
I know how to check which host it is being run on with the hostname command and storing in a variable, but I don't know how to check that against the values in the hash of arrays. I think I might be using the wrong data structure. Could anybody help please. Thanksuse strict; use warnings; our %Services = ( { serviceid => "1", name => "servicea", host => [ qw(hosta hostb)], serviceid => "2", name => "serviceb", host => [ qw(hostc) ], } );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Question about data structures
by kyle (Abbot) on Apr 04, 2007 at 13:19 UTC | |
|
Re: Question about data structures
by philcrow (Priest) on Apr 04, 2007 at 13:27 UTC | |
by wishartz (Beadle) on Apr 04, 2007 at 13:50 UTC | |
|
Re: Question about data structures
by wfsp (Abbot) on Apr 04, 2007 at 13:23 UTC | |
|
Re: Question about data structures
by graff (Chancellor) on Apr 05, 2007 at 02:24 UTC | |
|
Re: Question about data structures
by DACONTI (Scribe) on Apr 06, 2007 at 02:48 UTC |