There. Automatic fetching and caching. HTTP::Cache::Transparent is a wonderful thing.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";
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to Re: quotes from the great master
by merlyn
in thread quotes from the great master
by sh1tn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |