I have this perl script as follows
When i run this script, it runs successfully, the file.txt is also created but nothing is written to the file.txt, its empty...
Any beginners or pros or masters or experts on perl, who can help me out here??..thanks in advance
Code:
#!/usr/bin/perl
use CGI::Carp qw(fatalsToBrowser);
use LWP::Simple;
use CGI;
$query = new CGI;
print $query->header;
$content = get("http://www.cpan.org/doc/FAQs/index.html");
open FILEHANDLE, ">file.txt";
print FILEHANDLE $content;
close FILEHANDLE;
When i run this script, it runs successfully, the file.txt is also created but nothing is written to the file.txt, its empty...
Any beginners or pros or masters or experts on perl, who can help me out here??..thanks in advance