I'm not sure I understood your question exactly, but I'll try anyway.
You can put a note (a constant or something) In your code between the code and the perldoc, and write a little script that gets a script filename as parameter and prints It's contents until it reaches the note (if the perldoc is at the end of your script, otherwise you print after you found the note).