in reply to Re^3: How to return a two dimensional array from a function in Perl?
in thread How to return a two dimensional array from a function in Perl?

> Super simple example below, did not even put in strict and warnings.

But using strict and warnings would have told you what's wrong.

These are two different variables:

$LON = (); $LON[0][0] = "Tim";

Two solutions, either

my $LON ; # scalar is array ref $LON->[0][0] = "Tim"; ... return $LON;

or

my @LON; # array $LON[0][0] = "Tim"; ... return \@LON; # return ref

See perldsc and perlref for more

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice