Basic HTML version of Foils prepared Sept 20 97

Foil 13 Soft Symbol Table References - 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 One of Perl's "problems" (also its strength if you are knowledgeable) is that one often needs to understand implementation issues to use effectively
2 Every package has a symbol table (i.e. a list of used symbols) called :: so that main symbol table is
3 %main:: and variable $var in main has symbol table entry $main::{'var'}
4 *var is equivalent to $main::{'var'}
5 The symbol $original exists, we can set
6 *var = *original; # and then $var is another 'name' for $original and @var is another name for @original, etc.
  • That is, $var @var %var have same symbol table entry but will have different hard references

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