Sortign sub routines or functions in source code or scripts

I have plenty of sub routines defined in my perl script, they are all in random order. I want them sorted alphabetically. Is there any automatic way to get this done?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

nemws1Database AdministratorCommented:
Not easily via perl.  It may be a feature of whatever text editor to use, but I doubt it (I don't recall this feature in either Notepad++ or Textmate).

The best recommendation I can come up with is to move the subroutines into a library and sort them as you go.  Not ideal, I know, but better than just leaving them be the way they are now.
I agree with nemws1 - I am not aware of any automated way.  Begs the question of why?  I have had programs like that too from time to time (much to my dismay) ... but I use Notepad++ AND the 'Function List' plugin - it gives me a list of all of the subroutines in a side window that is a) sortable and b) allows a double click to move to that sub directly.  I find this useful. I am sure other editors probably have similar functionality.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Do you mean in editor?
What IDE/Editor are you using?

The whole sub or just its prototypes.  Sorting just the prototypes would be extremely easy using vi.

itniflAuthor Commented:
I have been using Notepad++
itniflAuthor Commented:
I will go for Notepad++ 's Function List addin, thanks :)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.