Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

(Ovid) Re: Using

by Ovid (Cardinal)
on Nov 15, 2001 at 04:28 UTC ( [id://125473]=note: print w/replies, xml ) Need Help??


in reply to Using 'use' away from script start

No. use happens at compile time and your example will always use the module. Use this:

sub once_in_a_blue_moon { require LWP::Simple; LWP::Simple->import; my $page = get('http://www.yahoo.com'); }

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://125473]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2025-03-26 14:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When you first encountered Perl, which feature amazed you the most?










    Results (68 votes). Check out past polls.

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.