fokigray.blogg.se

Perl system
Perl system












perl system perl system

If a condition is true then Logical NOT operator will make false. Use to reverses the logical state of its operand. If any of the two operands are non zero then then condition becomes true.Ĭ-style Logical OR operator copies a bit if it exists in eather operand.Ĭalled Logical NOT Operator. If both the operands are true then then condition becomes true.Ĭ-style Logical AND operator copies a bit to the result if it exists in both operands.Ĭalled Logical OR Operator. Assume variable $a holds true and variable $b holds false then −Ĭalled Logical AND operator. There are following logical operators supported by Perl language. The left operands value is moved right by the number of bits specified by the right operand.Įxample − $a > 2 will give 15 which is 0000 1111 Assume variable $a holds 10 and variable $b holds 20 then, lets check the following numeric equality operators −Ĭhecks if the value of two operands are equal or not, if yes then condition becomes true.Ĭhecks if the value of two operands are equal or not, if values are not equal then condition becomes true.Ĭhecks if the value of two operands are equal or not, and returns -1, 0, or 1 depending on whether the left argument is numerically less than, equal to, or greater than the right argument.Ĭhecks if the value of left operand is greater than the value of right operand, if yes then condition becomes true.Ĭhecks if the value of left operand is greater than or equal to the value of right operand, if yes then condition becomes true.īinary Right Shift Operator. These are also called relational operators. Performs exponential (power) calculation on operatorsĮxample − $a**$b will give 10 to the power 20 Multiplies values on either side of the operatorĭivides left hand operand by right hand operandĭivides left hand operand by right hand operand and returns remainder Subtracts right hand operand from left hand operand Perl Arithmetic OperatorsĪssume variable $a holds 10 and variable $b holds 20, then following are the Perl arithmatic operators −Īdds values on either side of the operator Lets have a look at all the operators one by one. Perl language supports many operator types, but following is a list of important and most frequently used operators − Here 4 and 5 are called operands and + is called operator. Simple answer can be given using the expression 4 + 5 is equal to 9.














Perl system