in reply to Append Logic
Looks to me like you're keying the hash on the wrong data -- I think you'd have an easier time if you keyed your hash on $host and stored an array of $router's for each host.
So your hash assignment would like this:
push @{$hash{$host}}, $router;
And your current foreach loop would then be:
foreach $key (keys %hash) { print "$program $key $matrix "; print "$path/CISCO_$_.clean " for @{$hash{$key}}; print "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Append Logic
by Anonymous Monk on Jan 31, 2001 at 02:56 UTC | |
by chromatic (Archbishop) on Jan 31, 2001 at 09:17 UTC | |
by Anonymous Monk on Jan 31, 2001 at 21:21 UTC |