[prog] [Perl] chop URL to get filename

Anicka Bernathova anicka at anicka.net
Mon Apr 30 16:58:05 UTC 2007


> you might do:
> 
>     system ("$wget $fetch_file");
>     # Check whether anything went wrong
>     if( $? ) {
>         die "Failed to wget file.";
>     }
> 

I think that even better would be to avoid calling system wget and use
LWP (module libwww-perl on cpan) instead.
Example see ie. here:  http://www.perl.com/pub/a/2002/08/20/perlandlwp.html

Enjoy perl! :-)

-- 
Anicka Bernathova
-------------------------------------------
...peeping at the world behind bear paws...



More information about the Programming mailing list