GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
WWW::Dilbert(3) User Contributed Perl Documentation WWW::Dilbert(3)

WWW::Dilbert - Retrieve Dilbert of the day comic strip images

 use WWW::Dilbert qw(get_strip mirror_strip strip_url);
 
 # Get the URL for todays strip
 my $image_url = strip_url();
 
 # Get todays strip
 my $image_blob = get_strip();
 
 # Get a specific strip by specifying the ID
 my $ethical_garbage_man = get_strip("2666040051128");
 
 # Write todays strip to local_filename.gif on disk
 my $filename_written = mirror_strip("local_filename.gif");
 
 # Write a specific strip to mystrip.gif on disk
 my $filename_written = mirror_strip("mystrip.gif","2666040051128");

This module will download the latest Dilbert of the Day cartoon strip from the Dilbert website and return a binary blob of the image, or write it to disk.

The following functions can be exported with the ":all" export tag, or individually as is show in the above example.

 # Return todays strip URL
 my $url = strip_url();

 # Return the strip matching ID 200512287225
 $url = strip_url("200512287225");

Accepts an optional argument strip ID argument.

 # Get todays comic strip image
 my $image_blob = get_strip();

Accepts an optional argument strip ID argument.

 # Write todays comic strip to "mystrip.gif" on disk
 my $filename_written = mirror_strip("mystrip.gif");

Accepts two optional arguments. The first is the filename that the comic strip should be written to on disk. The second specifies the strip ID.

Returns the name of the file that was written to disk.

$Id: Dilbert.pm,v 1.19 2006/01/12 22:30:11 nicolaw Exp $

Nicola Worthington <nicolaw@cpan.org>

<http://perlgirl.org.uk>

Copyright 2004,2005,2006 Nicola Worthington.

This software is licensed under The Apache Software License, Version 2.0.

<http://www.apache.org/licenses/LICENSE-2.0>

2022-04-07 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.