[wplug] backquote lynx $var in perl -- ?

James O'Kane jo2y at midnightlinux.com
Sat Jul 8 05:35:39 EDT 2006


On Sat, 8 Jul 2006, Juan Zuluaga wrote:

> my
> $url="http://www2.bvs.org.ve/scielo.php?script=sci_issuetoc&pid=0798-299220050001&lng=es&nrm=iso";
> my $junk = `lynx -dump $url`;
> print $junk;
> # it goes to bvs.org.ve but tries to read a wrong page
>
> print "Explicit...";
> $junk = `lynx -dump
> "http://www2.bvs.org.ve/scielo.php?script=sci_issuetoc&pid=0798-299220050001&lng=es&nrm=iso"`;
> print $junk;
> # it works

In the second version, the quotes are passed to the shell as well. In the 
first version, the quotes aren't passed, so that & is interpreted by the 
shell as the put into background operator and the pid part is considered a 
new shell command.
I suspect this would work:
my $junk = `lynx -dump "$url"`;

You might want to look at qx//.

-james



More information about the wplug mailing list