Lynx???
Austin Schutz
tex at off.org
Tue Jul 9 16:32:21 CDT 2002
On Tue, Jul 09, 2002 at 02:07:01PM -0700, Kilbey, Aaron wrote:
> Aloha everybody -
> I'm attempting to issue an http request through lynx to save an XML file to
> a local server.
> Here's the code:
>
> ----------------------------------------------------------------------------
> ----------
> Newsdump.pl
> ----------------------------------------------------------------------------
> ----------
> #!/usr/bin/perl
>
> system("lynx -dump http://www.moreover.com/cgi-local/page?feed=239&o=xml >
> news.xml");
> ----------------------------------------------------------------------------
> ----------
>
> 1. When I do: "bash$ perl newsdump.pl" I get a zero length news.xml
Try running it in a shell. You'll see it try run lynx in the
background. This is probably not the desired behavior.
Try:
system(
"lynx -dump " .
"'http://www.moreover.com/cgi-local/page?feed=239&o=xml'" .
" > news.xml"
);
where the ampersand is quoted. See perldoc -f system, and note the
bits about sh -c.
Austin
TIMTOWTDI
More information about the Pdx-pm-list
mailing list