Depends if you're looking semi-technical or not. How about my hostify script that puts DNS entries into /etc/hosts?
http://blog.twoshortplanks.com/2011/01/30/hostify/ Mark. On Mon, May 30, 2011 at 11:40 AM, Leo Lapworth <l...@cuckoo.org> wrote: > Hi, > > I'm working on http://learn.perl.org/ and I'd like to have a few rotating > example of what can be done with Perl on the home page. > > The first two I've thought of are below, does anyone have others? > > They don't have to use CPAN modules, one liners are fine as long as it > is simple to see what they do. I'll have a 'more' link which goes on to > show full example with line by line explanations. > > Module preference is anything from http://search.cpan.org/dist/Task-Kensho/ > > E.g.: > > This is probably max sort of size... > > # Send an email > use Email::Sender::Simple qw(sendmail); > use Email::Simple; > use Email::Simple::Creator; > > my $email = Email::Simple->create( > header => [ > To => '"Xavier Q. Ample" <x.am...@example.com>', > From => '"Bob Fishman" <o...@example.mil>', > Subject => "don't forget to *enjoy the sauce*", > ], > body => "This message is short, but at least it's cheap.\n", > ); > > sendmail($email); > > or > > # Serve static files from document root with a directory index > # app.psgi > use Plack::App::Directory; > my $app = Plack::App::Directory->new({ root => "/path/to/htdocs" })->to_app; > > > plackup > > Accepting connections at http://0:5000/ > > Thanks in advance! > > Leo >