Mega Code Archive

 
Categories / Perl / Language Basics
 

Perl offers many types of operators

Assignment              =,  +=,  -=,  *= , %=,  ^=,  &=,  |=,  .= Numeric equality        ==, !=, <=> String equality         eq, ne, cmp Relational numeric      >   >=  < <= Relational string       gt, ge, lt, le Range                   5 .. 10 # range between 5 and 10, increment by 1 Logical                 &&, and,  ||, or, XOR, xor,  ! Autoincrement/decrement ++  -- File                    -r, -w, -x,-o, -e, -z, -s, -f, -d, -l, etc. Bitwise                 ~  &  |   ^   <<   >> String concatenation    . String repetition       x Arithmetic              * / - + % Pattern matching        =~, !~