require FILENAME behaves similar to do FILENAME, and if you check out perldoc -f do you'll see:
It also differs in that code evaluated with "do FILENAME" cannot see lexicals in the enclosing scope; "eval STRING" does.
In reply to Re: require function not passing lexical variable
by Fletch
in thread require function not passing lexical variable
by mellin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |