Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^4: modify @INC

by diotalevi (Canon)
on Dec 26, 2002 at 23:02 UTC ( [id://222431]=note: print w/replies, xml ) Need Help??


in reply to Re: Re^2: modify @INC
in thread modify @INC

Oh yeah.. that's funny. Get this - right as soon as the implicit BEGIN (via the use) is parsed inside the currently-being-parsed BEGIN block it is executed. So you're attempting to use $a in your nested BEGIN block prior to defining it. See?

BEGIN { my $a = "c:/"; BEGIN { require "$a"; import "$a"; } }

Fun Fun Fun in the Fluffy Chair

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2024-06-22 05:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.