$ perl -e 'print "fred" eq "fred\n" ? "t" : "f","\n";' f $ perl -e 'print "fred" == "fred\n" ? "t" : "f","\n";' t