Basic HTML version of Foils prepared Sept 20 97

Foil 40 Some Predefined Variables in Perl - 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


There are the original cryptic two character names and those with a more mnemonic value which are accessible if one invokes
  • use English; # pragma
Here are a few examples -- we gave some of the predefined variables defining formatted output in first Perl foilset
$ARG or $_ is default name when nothing specified
  • s/rubbish//; # is equivalent to
  • $_ =~ s/rubbish/;
  • chomp(); # is equivalent to
  • chomp($_); # etc.



© 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