Monday, June 6, 2011

perl string compare

To compare striings in perl use this simple example

#here eq must be used if you use "=" it will always return a positive value
if ( $dd eq "hello" )
       print "it is equal");
      print "it is not equal"

Also refer to the perl comparison  in the site for better understanding

No comments:

Post a Comment