Basic HTML version of Foils prepared Sept 20 97

Foil 42 Some functions equivalent to Different Quotes

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


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