Mega Code Archive

 
Categories / Perl / Language Basics
 

Use eq to compare strings

#!c:\perl\bin $string1="B"; $string2="E"; if($string1 eq $string2) {     print "Those two names are the same! \n"; }else{     print "Those two strings are not the same! \n"; }