- or download this
my @records;
@records = qw( name ID email phone );
- or download this
while (<DATA>) {
chomp;
my ($key, $value) = split;
...
$record{$key} = $value;
push @records, \%record;
}
- or download this
foreach my $rec (@records) {
print "ID: $rec->{ID}\n";
print "Name: $rec->{name}\n";
}