- To: slug@xxxxxxxxxxx
- Subject: [SLUG] Perl Q
- From: Michael Lake <Mike.Lake@xxxxxxxxxx>
- Date: Wed Jul 12 12:18:34 2000
- Organization: University of Technology, Sydney
Hi,
Simple Q,
My perl script has a function and I want to return two
arrays from the function. I found that I can't just assign
the return values like this;
(@A, @B) = readData();
sub readData
{
# get data and create @A and @B
return (@A, @B);
}
My perl book doesn't cover returning more than one array. Do
I use references? I don't want to put A and B into a single
array and return that then later have to separate out A and
B.
The perl script runs on my Linux box here via apache and is
part of the new computer based chemistry experiment for this
semester coming up.
Mike
--
--------------------------------------------------------------------
Michael Lake
University of Technology, Sydney
Email: mailto:Mike.Lake@xxxxxxxxxx Ph: 02 9514 1724 Fx: 02
9514 1628
URL: http://www.science.uts.edu.au/~michael-lake/
Linux enthusiast, active caver and interested in anything
technical.
--------------------------------------------------------------------