Perl ABC

  1. Perl
  2. ›
  3. Syntax
  4. ›
  5. string
  6. ›
  7. here

Escape sequence - special characters that can be used in strings

Escape sequence is single quote string or double quote string < A special character that can be used in/a>.

Escape sequences start with a backslash "\".

The types of special characters that can be used differ between the escape sequence of a single-quoted string and the escape sequence of a double-quoted string.

Here are some examples of escape sequences.

In a single quote string, you can use "\'" to represent the single quote itself.

You can use "\t" for tabs and "\n" for a line break in double-quoted strings.

Details are explained below.

  • Escape sequence of single quoted strings
  • Double quote string escape sequence

Related Informatrion

  • News
  • Free Online Courses
  • Twitter
Perl Club