$str1 = "'Some String'"; $str2 = '"Some String"'; if( $str1 ne $str2 ) { print ">>$str1<< is different to >>$str2<<\n"; } ... >>'Some String' is different to >>"Some String"<<