in reply to Re^3: Mulitple values for a key in a hash (Pennance Required)
in thread Mulitple values for a key in a hash
$host=`hostname`; $filesystem = ARGV[0]; my %filesystems = ( hosta => (desc => 'x', filesystems => (qq|/dat +a/file/a| =>0, qq|/data/file/b| =>0)), tx05 => (desc => 'r',filesystems => (qq|/data/ +file/c| =>0, qq|no filesystemB for 2nd host | => 0))); if ( ! exists $filesystems{$host}{filesystems}{$filesystem} ) { print "error\n";} else {print "Found filesystem $filesystem on host $host\n". $filesyste +ms{$host}{descr}."\n";}
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Mulitple values for a key in a hash
by roboticus (Chancellor) on Nov 30, 2007 at 20:48 UTC |