$orig = <>; chomp($new = $orig); $new = "$new\n"; print $orig eq $new ? "yes" : "no";