View Single Post
  #19  
Old 03-18-2008, 03:14 AM
So_1337
Dragon
 
Join Date: May 2006
Location: Cincinnati, OH
Posts: 689
Default

There's a lot of different comparisons that can be done with perl.

Quote:
Originally Posted by From the quest tutorial wiki
Note, special operators apply to string comparisons in perl!

Operators:
$1 == $2 : If variable $1 is the same as variable $2, carry on.
$1 != $2 : If variable $1 is NOT the same as variable $2, carry on.
$1 > $2 : If variable $1 is greater than variable $2, carry on.
$1 < $2 : If variable $1 is less than variable $2, carry on.
$1 >= $2 : If variable $1 is greater than or equal to variable $2, carry on.
$1 <= $2 : If variable $1 is less than or equal to variable $2, carry on.
$1 eq $2 : If string variable $1 is the same as string variable $2, carry on.
$1 ne $2 : If string variable $1 is NOT the same as string variable $2, carry on.
$1 =~ $2 : If string variable $1 contains/matches the string variable $2, carry on.
Yours is the last on the list. It makes text-based chat with NPCs a little more forgiving.
Reply With Quote