mellin has asked for the wisdom of the Perl Monks concerning the following question:
That required code is a normal perl-code, without any sub-programs, but that $relative_map variable just doesn't get passed to it? I have understood that variable defined as lexical can be read from anywhere in the current 'scope', but not higher from the point where defined. (i can't explain this better, english not native language..) Simply put: why can't that required code read that variable?my $relative_map = 'relative.lib'; require "$cgi_dir/$sub_search_form" unless ($gbook);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: require function not passing lexical variable
by Fletch (Bishop) on Nov 12, 2004 at 19:56 UTC | |
|
Re: require function not passing lexical variable
by tilly (Archbishop) on Nov 12, 2004 at 21:39 UTC |