Basic HTML version of Foils prepared April 16,1996

Foil 42 Some functions equivalent to Different Quotes

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


q(string) or qDstringD for any delimiter D -- interprets string as a literal
  • This delimiter use is like mDregexpD or sDregexp1Dregexp2D
  • the one q in q() denotes single quotes
q(string) is equivalent to 'string' except works even if unprotected ' in string
qq(string) or qqDstringD is similarily equivalent to "string" except you do NOT need to protect " inside it
  • However $variables and \n etc. are interpolated inside string
  • The two q's in qq() denotes double quotes
qx(string) is similarily equivalent to `string` --
  • the x in qx stands for execute



© 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