Just another Perl shrine | |
PerlMonks |
Re: use, require, do or what?by moritz (Cardinal) |
on Jul 30, 2008 at 18:52 UTC ( [id://701229]=note: print w/replies, xml ) | Need Help?? |
It doesn't work because $variable1 is only known in your client file, not in the library.
The solution is to encapsulate the code in the library into a subroutine, and call that:
Even better: make the library a module, and then use it.
In Section
Seekers of Perl Wisdom
|
|