joshua
joshua

Reputation: 1

multi dimensional array creation

being a beginner of perl i m not sure of the scope of perl. can somebody gimme a basic program for multi dimensional array creation n the full idea behind the code? thanks in advance..

Upvotes: 0

Views: 409

Answers (4)

Joel Berger
Joel Berger

Reputation: 20280

daxim has the right stuff for most cases. In the rare case of doing purely numerical manipulation see PDL . PDL allows Perl to behave a little more like Matlab.

Again, If this doesn't ring any bells, see daxim's answer.

Upvotes: 1

daxim
daxim

Reputation: 39158

See chapter "Nested Data Structures" in the Modern Perl book, and perllol and perldsc in the documentation.

Upvotes: 4

Dallaylaen
Dallaylaen

Reputation: 5308

perldoc perllol has detailed explanation regarding nested arrays. See also perldoc perlreftut.

Upvotes: 3

rickumali
rickumali

Reputation: 727

Arrays in Perl can only hold scalars. However, those scalars can be array references. Check out these two links (in this order), which helped refresh my own understanding. The perldoc link contains the canonical example code that will help you get started. Good luck!

http://www.perlmonks.org/?node_id=90647

http://perldoc.perl.org/perldsc.html

Upvotes: 2

Related Questions