Basic HTML version of Foils prepared April 16,1996

Foil 18 Data Structures, Arrays of Arrays in Perl5 -I

From Perl5 and Advanced Perl4 Features Computational Science for Information Age Course CPS616 Material -- April 16,1996. by Geoffrey C. Fox


1 Read Chapter 4 of Camel Book (second edition) or manual pages on PerlLOL (List of Lists) and PerlDSC (Data Structures Cookbook) -- these have lots of excellent examples
2 $LoL3D[$x][$y][$z] = scalar func($x,$y,$z); # scalar forces scalar context
3 is a classic (Fortran like) 3D array except it need NOT be predefined and there are no such things as dimensions and arrays can be ragged with $x=1 having very different $y $z ranges from $x=2 etc
  • In ragged array, missing elements return undef if accessed

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat Sep 6 1997