develooper Front page | perl.beginners | Postings from September 2006

getting columns of 2D array

Thread Next
From:
Aditi Gupta
Date:
September 22, 2006 16:31
Subject:
getting columns of 2D array
Hello Everybody,

We can get rows of a 2D array as

$aref = $AoA[$i];
print @$aref; #will print row 'i' as an array

How can I print column 'i' as an array using references? Is there any
other way which doesn't require two 'for loops' to print the columns?

Thanks in advance,
Aditi

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About