String operators : String « String « Perl






String operators

   

OPERATOR     PURPOSE

x            repeated the number of times of the right operand.

.            Concatenates the two strings.

eq           Returns True if the two operands are equal, False otherwise.

ne           Returns True if the two operands are not equal, False otherwise.

Le           less than

lt           less than or equal

ge           greater than or equal

gt           greater than the operand on the right of the operator.

cmp          Returns -1, 0, or 1 if the left operand is, stringwise, less than, equal to, or greater than the right operand.

,            Evaluates the left operand, then evaluates the right operand. Returns the result of the right operand.

++           Increments the string by one alphabetic value.

   
    
    
  








Related examples in the same category

1.String Operations
2.String Operators: the right and wrong ways to perform an equivalence check on a string:
3.String plus
4.String variable
5.Strings are normally delimited by a matched pair of either double or single quotes.
6.ASCII Character Codes
7.A string is a sequence of bytes (characters) enclosed in quotes.
8.Calculation on string
9.Use print to output string
10.Append two string value
11.Perl 5 String Functions
12.Using ~ operator to check if a scalar is a string type variable
13.String Literals
14.String value reference