- or download this
$hash{$name}{$id}= $comment;
push @{$hash{$name}{$id}}, $comment; #this one has been commented out
- or download this
my %hash;
my ($name, $id, $comment);
...
#push @{$hash{$name}{$id}}, $comment; #create an anonymo
+us array
#in case more than
+ one $comment or other variables related to same $name/$id
}
- or download this
Name1 12 firstname1 some more info
- or download this
for my $key1(sort keys %hash){
print "$key1\t->$hash{$key1}\t"; #$hash{$key} hash referenc
+e,to access it dereference it.....
...
print "$key2\t->$hash{$key1}{$key2}\t\n";
}
}
- or download this
use strict;
use warnings;
...
Name1 12 firstname1
Name2 55 firstname2
Name3 20 firstname3
- or download this