Friday, 6 September 2013

I want to compare two values having special character in perl but this is failing

I want to compare two values having special character in perl but this is
failing

I am getting following values for $var1 and $var2; $var1 is:
Dec 12 17:08:00 webui[1310]: USER:admin@10.10.200.27
COMMAND:<local-userdb-ap add mac-address "00:0b:86:68:03:a6" ap-group
"remoteAP" ap-name "HBF_03-56_RAP1" description "RAP deployed in
HarbourFront" > -- command executed successfully
$var2 is also the same.
When I am doing just the comparison:
if( $var1 eq $var2)
{
print "OK";
}
else
{
print "Not OK";
}
This is not working. I tries chomp also for this two variable. But still
no use. Please suggest..Whether this is possible to compare strings like
this?

No comments:

Post a Comment