I'm trying to understand the tutorial on links in Perl
perldoc perlreftut
So far, with the code below, I initialize an empty hash with
my %table
Here is the whole program
use strict;
my %table;
while (<DATA>) {
chomp;
my ($city, $country) = split /, /;
push @{$table{$country}}, $city;
print @{$table{$country}};
}
__DATA__
Chicago, USA
Frankfurt, Germany
Berlin, Germany
Washington, USA
Helsinki, Finland
New York, USA
Can someone explain the line below to me because I am confused since I see the link (I think) here, but it was initialized as a hash with% table.
push @{$table{$country}}, $city;
source
share