http://www.perlmonks.org?node_id=1000649


in reply to 'extract' subs from source code

From reorder subroutines in a perl file.:

PPI - Parse, Analyze and Manipulate Perl (without perl)

Here is an example which can get you started: How can I write a Perl script to extract the source code of each subroutine in a Perl package?