in reply to Re^2: Data manipulation on a file
in thread Data manipulation on a file
Loop over for my $hostname (keys %hosts), or if you like, over for my $hostname (sort keys %hosts) so the host names come out in asciibetical order.
Between $hostname and join ':', @{ $hosts{$hostname} }, you've then got everything you need to concatenate onto your output string inside the loop. Make sure your output variable is defined outside the loop so you're not just throwing the results away when the loop ends.
%hosts might be more clear if named %mountPoints or %hostToMountPoints if you don't mind the typing.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Data manipulation on a file
by sstruthe (Novice) on Oct 01, 2015 at 09:30 UTC | |
by Corion (Patriarch) on Oct 01, 2015 at 09:34 UTC | |
by sstruthe (Novice) on Oct 01, 2015 at 10:26 UTC | |
by sstruthe (Novice) on Oct 02, 2015 at 20:50 UTC | |
by CountZero (Bishop) on Oct 02, 2015 at 21:23 UTC | |
by sstruthe (Novice) on Oct 02, 2015 at 21:38 UTC | |
by CountZero (Bishop) on Oct 02, 2015 at 21:41 UTC | |
by sstruthe (Novice) on Oct 04, 2015 at 18:20 UTC |