in reply to Can a large subroutine be split in two (e.g. parent and child relationship)?
If I'm understanding it right, you have something like this:
sub foo { my ($var1, $var2, $var3, @arr1); [a large pile of code] }
And you vant to split that code in two smaller subs but are worried about variable scoping and so. What about this?
{ my ($var1, $var2, $var3, @arr1); sub foo { [some code] bar(); } sub bar { [rest of the code] } }
--
David Serrano
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Can a large subroutine be split in two (e.g. parent and child relationship)
by GrandFather (Saint) on Jul 05, 2006 at 21:04 UTC | |
by Hue-Bond (Priest) on Jul 05, 2006 at 21:08 UTC |