use Plake qw(target my_builder); # ... Open file... # Parse while() { Plake::parse($_); } # Setup targets (and whatever else) eval $Plake::CODE; # Build a target. $src is the assembled content. $target is # the path to the output file that should be created, if one # is defined. $stickler_mode = 'on'; my ($target, $src) = Plake::build('target_name', $stickler_mode); # ... Now, do something with $target and $src ...