www.perl.com
Perl Programming
Quoting Operators
  • Quoting operators construct strings
  • Many types of quoting are provided
    • Literal, Interpolating (", qq)
    • Literal, Non-interpolating (', q)
    • Command execution (`, qx)
    • Word list (qw)
    • Pattern matching
  • Choose your own delimiters (qq(), qq{}, qq**)

        my $cat = "meow";
        my $sound = "$cat";              # $sound = "meow"
        my $variable = '$cat';           # $variable = "\$cat"
        print "$variable says $sound\n";

        $sound = qq{"meow"};             # If you want to quote quotes 
        $sound = qq("meow");             # Same
        print "$variable says $sound\n";

        $contents = `cat $sound`;        # contents of file "meow"
      

        $cat says meow
        $cat says "meow"
      
http://stuff.mit.edu/iap/perl/