- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Escaping Characters in Perl
Perl uses the backslash (\) character to escape any type of character that might interfere with our code. Let's take one example where we want to print double quote and $ sign −
Example
#!/usr/bin/perl $result = "This is \"number\""; print "$result\n"; print "\$result\n";
Output
This will produce the following result −
This is "number" $result
- Related Articles
- Escaping Characters in Bash on Linux
- PHP Escaping From HTML
- Escaping quotes while inserting records in MongoDB?
- Swift optional escaping closure parameter
- What is the use of Escaping in LESS?
- Escaping/encoding single quotes in JSON encoded HTML5 data attributes
- Comments in Perl
- Whitespaces in Perl
- Dereferencing in Perl
- "Here" Documents in Perl
- Creating Variables in Perl
- Multiline Strings in Perl
- V-Strings in Perl
- Array Size in Perl
- Sorting Arrays in Perl

Advertisements