(untested).use Data::Dumper; my %hash; while (<>) { chomp; my ($what,$where) = split /\s+/,$_; exists $hash{$what} || $hash{$what} = []; push @{$hash{$what}},$where; } print Dumper %hash;
In reply to Re: Representing a connection matrix of graph
by aitap
in thread Representing a connection matrix of graph
by zing
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |