Like any other programming language Perl also has various operators for different
mathematical, lexical, logical operations.
The broad categories or Perl operators are.
· Arithmetic Operators
· Assignment Operators
· Numeric Comparison
· String Comparison
· Logical Operators
Arithmetic Operators
Operator Function
+ Addition
-
Subtraction, Negative Numbers, Unary
Negation
* Multiplication
/ Division
% Modulus
** Exponent
List of Arithmetic Operators in Perl
Like any other programming language the above operators perform operations indicated
by their name.
Example1
The total revenue of a web portal could be.
$cost=20;
$profit=10;
$net_profit=$profit-$cost;
No comments:
Post a Comment