- 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
Perl Miscellaneous Operators
There are following miscellaneous operators supported by Perl language. Assume variable a holds 10 and variable b holds 20 then −
Sr.No. | Operator & Description |
---|---|
1 | . Binary operator dot (.) concatenates two strings. Example− If $a = "abc", $b = "def" then $a.$b will give "abcdef" |
2 | x The repetition operator x returns a string consisting of the left operand repeated the number of times specified by the right operand. Example− ('-' x 3) will give ---. |
3 | .. The range operator .. returns a list of values counting (up by ones) from the left value to the right value Example− (2..5) will give (2, 3, 4, 5) |
4 | ++ Auto Increment operator increases integer value by one Example− $a++ will give 11 |
5 | -- Auto Decrement operator decreases integer value by one Example− $a-- will give 9 |
6 | -> The arrow operator is mostly used in dereferencing a method or variable from an object or a class name Example− $obj->$a is an example to access variable $a from object $obj. |
- Related Articles
- Perl Arithmetic Operators
- Perl Equality Operators
- Perl Assignment Operators
- Perl Bitwise Operators
- Perl Logical Operators
- Perl Operators Precedence
- Introduction to Miscellaneous Problems
- Employee Provident Fund and Miscellaneous Provisions Act: An Overview
- Perl First Program
- Perl File Extension
- Comments in Perl
- Whitespaces in Perl
- Perl Scalar Variables
- Perl Array Variables
- Perl Hash Variables

Advertisements