I'm writing a simple Perl script (on Windows) to download the response of a get request to a url to a file. Pretty straight-forward. Except when it writes to the output file, I get extra line breaks. So like instead of:
<head>
<title>title</title>
<link .../>
</head>
I get
<head>
<title>title</title>
<link .../>
</head>
Here's the Perl script:
use LWP::Simple;
my $url = $ARGV[0];
my $content = get($url);
open(outputFile, '+>', $ARGV[1]);
print outputFile $content;
close(outputFile);
I suppose I could just get wget for Windows, but now this is bothering me. How do I get rid of those extra line breaks?!