Loading ...
Sorry, an error occurred while loading the content.

Re: Reg single quote

Expand Messages
  • sudhagkaran
    To summarize the main difference between single and double quotation marks: Single quotation marks do not interpret, and double quotation marks do. That is, if
    Message 1 of 7 , Apr 26, 2007
    • 0 Attachment
      To summarize the main difference between single and double quotation
      marks: Single quotation marks do not interpret, and double quotation
      marks do. That is, if you put something in single quotation marks,
      Perl assumes that you want the exact characters you place between the
      marks — except for the slash-single quote (\') combination and double-
      slash (\\) combination. If you place text inside double quotation
      marks, however, Perl interprets variable names. Perl also interprets
      special characters inside double-quoted literal strings.

      $Book = 'Perl For Dummies';
      print 'The title is $Book.';

      Output : The title is $Book.

      $Book = 'Perl For Dummies';
      print "The title is $Book.";

      Output : The title is Perl For Dummies.

      $Word1 = "thank";
      $Word2 = "you";
      $Sentence = "I just wanted to say $Word1 $Word2.";
      print $Sentence;

      Output : I just wanted to say thank you.

      I think this is enought for your clarification.
    Your message has been successfully submitted and would be delivered to recipients shortly.