Richard's Perl Step 14
Using Modules



- I used "Sams Teach Yourself Perl in 24 Hours" - 3rd Edition as a reference for this page
- Run in windows DOS prompt
perl thisprogram.pl

perl c:\......\thisprogram.pl

 

Examples following Perl 24 hours book, Hour 14:

eg026.pl (text only) - find file or directory, use the File module

eg027.pl (text only) - use the LWP module, simple content download from yahoo.com

 

More examples use LWP module and a bit of objects:

eg028.pl (text only) - LWP::Simple, simple get function to get a page at a URL.

eg029.pl (text only) - LWP::Simple don't support cookies or authorization; don't support header lines in request and response. We need LWP::UserAgent and HTTP::Response.

eg030.pl (text only) - Many HTML forms use GET method (default method for form). If the form uses POST method, you need to make changes. The URI class provides all sorts of methods for accessing and modifying parts of URLs.

 

More examples - ncbi blast:

eg031_ncbi.pl (text only) - search ncbi blast (RS126 full).
ncbi BLAST URL API user's guide (html) (pdf)