<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/language/perl/tags/easy</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Fri, 24 May 2013 06:58:02 GMT</pubDate>
<item>
<title>(Perl) How to start CPAN on Windows/ActivePerl - noah</title>
<link>http://snipplr.com/view/3718/how-to-start-cpan-on-windowsactiveperl/</link>
<description><![CDATA[ <p>ActivePerl has a great package manager utility -- just type "ppm" at the prompt.

The problem is that ActivePerl's PPM points to ActivePerl's package repository, which doesn't contain every module listed on CPAN.

The solution is to invoke the cpan utility under windows!  Here's how.</p> ]]></description>
<pubDate>Mon, 17 Sep 2007 10:23:37 GMT</pubDate>
<guid>http://snipplr.com/view/3718/how-to-start-cpan-on-windowsactiveperl/</guid>
</item>
<item>
<title>(Perl) starter Perl module - noah</title>
<link>http://snipplr.com/view/3136/starter-perl-module/</link>
<description><![CDATA[ <p>Put this in the file MyPackage.pm, and call it with Use::MyPackage</p> ]]></description>
<pubDate>Tue, 03 Jul 2007 23:04:21 GMT</pubDate>
<guid>http://snipplr.com/view/3136/starter-perl-module/</guid>
</item>
<item>
<title>(Perl) Grab linked files from a list of web pages - noah</title>
<link>http://snipplr.com/view/3126/grab-linked-files-from-a-list-of-web-pages/</link>
<description><![CDATA[ <p>## how to use

`perl grabit.pl urls_for_download.txt`

Expects as argument the name of a file containing a newline-delimited list of URLs:

    http://example.com/coolstuff
    http://example.com/coolstuff/fun
    http://example.com/videos/explosions

When invoked, launches an interactive shell that asks what type of file should be downloaded.  Then downloads all the files that are linked from each of the listed Web pages.

Note that the location of the download folder is hard-coded to `c:/windows/desktop/grabit/` so you may want to change that before trying.

This script is also [available on Github](http://github.com/textarcana/scrapers/blob/643e6e7cb349fa94cbc3fc88e1d55c7b6a262d11/grabit.pl)

## Wait! Do you know about WGet and Curl?

This script is legacy.  People seem to like it (hey, I still use it) but today I would probably not write my own tool to download multiple files off remote sites.

Instead I would likely just use a command-line Web browser like [WGet](http://lifehacker.com/software/top/geek-to-live--mastering-wget-161202.php 'Gina Trapani of Lifehacker, on the way of the WGet ninja') or Curl.  [LWP-Request would also do the trick](http://snipplr.com/view/4063/download-linked-jpegs-from-a-web-page-on-the-command-line/)

## do not comment your code like this!

For a great explanation of the rather baroque commenting style I was using circa 2001, see [Steve Yegge's excellent article on code style: *Portait of a n00b.*](http://steve-yegge.blogspot.com/2008/02/portrait-of-n00b.html)  

Of course, when I sit down to write a Perl script today, I [use POD](http://snipplr.com/view/18611/perl-pod-embedded-documentation-example/) to format and publish my comments.</p> ]]></description>
<pubDate>Tue, 03 Jul 2007 22:31:30 GMT</pubDate>
<guid>http://snipplr.com/view/3126/grab-linked-files-from-a-list-of-web-pages/</guid>
</item>
</channel>
</rss>