in reply to include file "inline"

do works, to a point, as does require. However, neither will let inline code see the surrounding scope. The only way to do this is with a fairly risky eval:

use File::Slurp; #!important! my $blah = new SOME::Module; $blah->start; eval read_file('guts.pl'); $blah->end;

This is not recommended, partly because it's slow. Eval can be risky, too, so read up on it before choosing something.

It's easy to build modules, so I strongly recommend that as an alternative course of action.

<-radiant.matrix->
A collection of thoughts and links from the minds of geeks
The Code that can be seen is not the true Code
I haven't found a problem yet that can't be solved by a well-placed trebuchet