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


package fred;
$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
$globalaccess = $fred::var;
Packages can be nested
package fred;
....................
package jim;
$var = 3.14159; # and now we use syntax
$globalaccess = $fred::jim::var;



© 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