use strict; use warnings; use Data::Dumper; $Data::Dumper::Sortkeys=1; my %hosts; for (qx(mount | grep 'type nfs' | awk -F/ '{print \$1,\$3}' | sort)) { chomp; my ($host, $mp) = split; push @{ $hosts{$host} }, $mp; } print Dumper(\%hosts);
See also:
In reply to Re: Data manipulation on a file
by toolic
in thread Data manipulation on a file
by sstruthe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |