Basic HTML version of Foils prepared March 30 97

Foil 6 Scalar Data III -- Double Quoted Strings (Chapter 2 of Llama Book)

From PERL4 Tutorial for CPS616 Computational Science for Information Age Course CPS616 -- February 1995. by Geoffrey C. Fox


1 Double Quoted strings are very similar to C with a lot of special characters given in table 2-1 of Llama book and online PERL man page. (See later in foils)
  • Examples: \n is newline, \t is tab and \cC is Control-C
  • Example: 'Hello
    • World' is equivalent to "Hello\nWorld"
  • Note \L instructs PERL that all following characters until a \E are to be interpreted as lower case.
  • \U ... \E is similar but intervening characters are Upper case
2 A critical feature of double quoted strings is that they can include variables designated by $ as initial character. For this reason use \$ to denote a real dollar sign in double quoted string.
3 Variables are NEVER interpolated in single quoted strings

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