Basic HTML version of Foils prepared Sept 20 97

Foil 41 Some Predefined Variables in Perl - II

From Perl5 and Advanced Perl4 Features Computational Science for Information Age Course CPS616 -- Sept 20 97. by Geoffrey C. Fox,Nancy McCracken,Tom Scavo


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 Sun Apr 5 1998