Basic HTML version of Foils prepared April 16,1996

Foil 41 Some Predefined Variables in Perl - II

From Perl5 and Advanced Perl4 Features Computational Science for Information Age Course CPS616 Material -- April 16,1996. by Geoffrey C. Fox


A match m/regexp/; or equivalent s pattern match sets
$MATCH or $& -- The matched string
$PREMATCH or $` to be string before matched string
$POSTMATCH or $' to be string after matched string
$LAST_PAREN_MATCH or $+ contains material in last paranthesis matched
  • useful when | syntax in regular expression make in unclear which $n is set for last paranthesis



© 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 Sat Sep 6 1997