You are currently appending two values to @cordinate_and_link
which sit next to each other – they are not in separate columns. To make clear that they are in two different columns, we push
an anonymous arrayref [...]
instead:
push @cordinate_and_link, [$cordinate , $link];
Parens ()
do not create arrays or tuples in Perl.
Later, we can loop over all rows and only print the first column in each row:
foreach my $cordinate (@cordinate_and_link) {
print $cordinate->[0];
}