in reply to Re: Re: Display $var content
in thread Display $var content
On a Mac, $/ is still "\n", but "\n" means "\015" and "\r" means "\012".
So, if $/ has not been set explicitly,
will print yes on Unix, Windows, and Mac.$orig = <>; chomp($new = $orig); $new = "$new\n"; print $orig eq $new ? "yes" : "no";
Of course, if $/ has been changed, then all bets are off. :)
|
|---|