How is wget different from Perl lwp?

I need to use wget for its ability to work as a finder in order to develop it for my project. But on all Google search engines, people see that people recommend using LWP instead of Wget. Can you guys tell me why this is?

+6
source share
1 answer

If you are writing in Perl and you need to make an HTTP request, you should usually use LWP. It is foolish to do something that is easily maintained in the Perl process.

If you want to do something more complex, such as recursive scanning on the Internet, you can look at the WWW::Mechanize or Mojolicious available on CPAN. But at this point, it may be prudent to use external tools that already have recursive scanning capabilities.

If you are writing a shell script and not a Perl program, you have no choice but to use an external tool. Choosing between wget , curl and LWP lwp-request ( lwp-request , GET , etc.) really comes down to what is easiest for your lwp-request use. They all have roughly the same features, but some things are easier to use in one tool than others. Use what is available for your system; usually there is more than one option, and in this case you should try all of them - read the document, try several use cases, see which one you like.

+7
source

Source: https://habr.com/ru/post/1438793/


All Articles