CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate: how to import a URL???: Edit Log



johnny241088
Novice

Feb 15, 2013, 4:25 PM


Views: 1064
how to import a URL???

I try tu read in a URL with this code

Code
use strict; 
use warnings;
use LWP::Simple;

my $local = "pcw.txt";
print "Bitte URL eingeben\n"; #Liest nur die Startseite ein
my $url = <STDIN>;

my $page = get($url) or die "failed!\n";

open my $out, '>', $local or die "Cannot open $local for output: $!\n";
print $out $page;
close $out;


but my problem is i receive (not become) ;) only the source code of the starting site and not of the hole url, but why???


(This post was edited by johnny241088 on Feb 16, 2013, 12:18 PM)


Edit Log:
Post edited by johnny241088 (Novice) on Feb 15, 2013, 4:39 PM
Post edited by johnny241088 (Novice) on Feb 16, 2013, 12:18 PM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives