in reply to Creating a Hash from Two Arrays
#!/usr/bin/perl -w use strict; my %switches = ( d => ['disk1', 'disk2', 'disk3'], l => ['load1', 'load2', 'load3'], m => ['memory1', 'memory2'], ); my $switch = 'l'; print @{$switches{$switch}} if exists $switches{$switch};
--
John.
|
|---|