simonodell1 has asked for the wisdom of the Perl Monks concerning the following question:
$attitude = "humble"; require PerlGOD::Knowledge; print "master, I beesech your wisdom";
I need a little help using Universal::Require.
here is a snippet of code which works...
my $url = 'http://www.perl.com'; use LWP::Simple; my $content = get $url; die "Couldn't get $url" unless defined $content; print "retrieved, $content";
I tried to use the LWP::Simple module through universal require thusly;
require UNIVERSAL::require; my $url = 'http://www.perl.com'; my $module = 'LWP::Simple'; my $return_val = $module->use or die $@; my $content = get $url; die "Couldn't get $url" unless defined $content; print "retrieved :: $content";
But it doesnt work :/ erm... what am i doing wrong?
for (1..*) { $thank = "PerlGOD"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Universal Require
by gloryhack (Deacon) on Apr 13, 2007 at 08:54 UTC | |
by simonodell1 (Novice) on Apr 13, 2007 at 09:18 UTC | |
by blazar (Canon) on Apr 15, 2007 at 10:32 UTC | |
by chromatic (Archbishop) on Apr 15, 2007 at 22:29 UTC |