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?
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
|
|---|