Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: quotes from the great master

by merlyn (Sage)
on Jul 02, 2006 at 11:27 UTC ( [id://558859]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to quotes from the great master

use HTTP::Cache::Transparent (); use LWP::Simple qw(get); use Compress::Zlib (); HTTP::Cache::Transparent::init({BasePath => "/tmp/http-cache-transpare +nt-$>"}); my $gzipped = get "http://www.perl.com/CPAN/misc/lwall-quotes.txt.gz"; my $quotes = Compress::Zlib::memGunzip($gzipped); my @quotes = split /\n%%\n/, $quotes; print $quotes[rand @quotes], "\n";
There. Automatic fetching and caching. HTTP::Cache::Transparent is a wonderful thing.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re^2: quotes from the great master
by sh1tn (Priest) on Jul 02, 2006 at 12:26 UTC
    Splendid way! ++


Re^2: quotes from the great master
by ady (Deacon) on Jul 04, 2006 at 01:22 UTC
    That's not cool...
    That's close to 0 dgK
    F*Freeeeezing++

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://558859]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.