The world of Fortran has fsplit, which splits Fortran source into individual subroutines or functions (they're different in Fortran, which is neither here nor there).
My question is, then, is there a similar program available for Perl? I am not terribly concerned with anonymous subs, nor am I terribly concerned with cases like
Thanks in advance!{ my %private_hash; sub build_data { # do magical stuff on %private_hash } sub get_item { my $item = shift; if(exists($private_hash{$item})){ return $private_hash{$item}; } else{ return undef; } } }
grammar correction
Having the fairly typical combination of hubris and laziness of a Perl code walloper, I've decided to build my own solution.
Right now, my idea is to
{ sub one { # magical stuff here } sub two { # more magical stuff here } }
</update: 13 Sept 2006>
emc
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.
In reply to Program to split a Perl program into subs by swampyankee
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |