Tech Journal Back to Tech Journal

How can I include a Perl file into another one?

A use "" will include "" in the current Perl file. But the inclusion isn't full. BEGIN, END, and similiar blocks will not get executed.

Also, stuff like use strict or use integer are file-scope only, so wherever you want those effects, you'll need to declare them that file. A since such declaration isn't enough.

Actually all the use are file-scoped. Be aware this applies to included files, and package files equally.

Last updated on 2005-07-07 14:00:00 -0700, by Shalom Craimer

Back to Tech Journal