Basic HTML version of Foils prepared April 16,1996

Foil 6 Perl Modules -- Packages - I

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


1 package fred
2 $var = 3.14159; # defines fred to be a package and var to be a variable in this package so that variables following this statement should be accessed by
3 $globalaccess = $fred::var;
4 Packages can be nested
5 package fred
6 ....................
7 package jim
8 $var = 3.14159; # and now we use syntax
9 $globalaccess = $fred::jim::var;

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