Basic HTML version of Foils prepared Sept 20 97

Foil 6 Perl Modules -- Packages - I

From Perl5 and Advanced Perl4 Features Computational Science for Information Age Course CPS616 -- Sept 20 97. by Geoffrey C. Fox,Nancy McCracken,Tom Scavo


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 Sun Apr 5 1998