Hello,
I was wondering how I would could access arrays of arrays. I would like to
be able to get to (print, for now) the value in each nested array. Here
is what I've been trying:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#!/usr/bin/perl
@jon = qw/ "jon" "hansfelt" "123-1122" /;
@ben = qw/ "ben" "jones" "222-1231" /;
@marsha = qw/ "marsha" "padgett" "333-9087" /;
@abe = qw/ "abe" "johnson" "421-4623" /;
@address = qw/ $jon $marsha $ben $abe /;
@address = sort @address;
for ($i = 0; $i <= $#address; $i++) {
@temp = $address[$i];
#print @temp."\n";
print $temp[0]."\n";
print $temp[1]."\n";
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I've tried different variations on the above with no success. Should I use
a 2-D array instead?
Thank you,
Robert
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]