On Thu, Jun 12, 2008 at 1:31 PM, stallomir <[EMAIL PROTECTED]> wrote:
> I want to wget several image files from a server at a time with the
> same format. So, I am trying to write a perl script which calls wget
> continuously, but with diffferent values of the variables. However,
> when I use a system( "$foo")call, with $foo as the string with
> variables, it doesn't seem to work, while if the wget command is used
> at the terminal, it works just fine... Could anyone throw some light
> on this matter?...The code is given below for reference...
>

Seems it's due to the meta characters in the quoted url.
try add a statement:

$url = quotemeta($url);

before the wget system call.

Btw, why not using the pure perl way of getting a file?
LWP::Simple is really easy to do it.

-- 
Jeff Peng - [EMAIL PROTECTED]
Professional Squid supports in China
http://www.ChinaSquid.com/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to