in reply to How can my script retrieve the contents of an existing webpage?

furtive is wrong there with the "system" answer. System doesn't return data. vroom was advocating the use of backticks with lynx. Placing a shell command in them nets you the standard out of the shell.
#try these and see under un*x my $s='%Y'; print "date $s", $/; print 'date $s', $/; print `date $s`, $/; print system("date $s"), $/; ## ## Thus [vroom]'s code should be ## $webpage=`lynx -source http://blah.com`; #gets html source of documen +t $webpage=`lynx -dump http://blah.com`; #returns output as formatted + text
  • Comment on Re: How can my script retrieve the contents of an existing webpage?
  • Download Code