Basic HTML version of Foils prepared Sept 20 97

Foil 5 General Remarks on PERL III

From Tutorial on PERL Computational Science for Information Age Course CPS616 -- Sept 20 97. by Geoffrey C. Fox,Nancy McCracken,Tom Scavo


1 PERL may be run interactively from the command line. For example,
  • % perl -v
2 will report the version of PERL in use.
3 The PERL command
  • % perl -e 'print "@INC\n";'
4 prints the search path for included files.
5 The command
  • % perl -MLWP -e 'print "libwww-perl-$LWP::VERSION\n";'
6 prints the installed version of LWP.
7 The complex PERL command
  • % perl -pi.bak -e 's/str1/str2/gi' `find . -name \*.html -print`
8 performs a case insensitive, global search-and-replace on all files ending with "html" in the current directory and all its subdirectories.

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 Sep 21 1997