in reply to wget not working from perl

  1. There shall NEVER be an else after a return/exit/croak/die! NEVER!
  2. You call wget from a composed string. If the $url has " in there (or worse, a ; followed by a command as haukex poited out in Re: wget not working from perl), quotation as you use it might fail:
    my $COMMAND = "wget -q -O $FILENAME $URL"; print `$COMMAND`;

    --->

    open my $sh, "-|", "wget", "-q", "-O", $FILENAME, $URL; print <$sh>; close $sh;

    is much safer.

  3. Why do you use all those capitalized variable names?
  4. Why use a shell escape anyway?
    use LWP::Simple; is_success (getprint ($URL)) or warn "Fetch failed";

Enjoy, Have FUN! H.Merijn