perlquestion
punkish
Wise siblings,
Since getting over embarrassment is the first step to learning, I admit here to not being able to answer the following --
Is it possible to create a subroutine exclusive to a subroutine? Conceptually speaking, I have --
<code>
lots of code
..
..
sub foo {
this;
that;
if (cond) {
CODE: many lines of code here;
} else {
for (a loop) {
something based on $_;
CODE: many lines of code here;
}
}
}
</code>
I want
<code>
lots of code
..
..
sub foo {
this;
that;
if (cond) {
bar();
} else {
for (a loop) {
something based on $_;
bar();
}
}
subsub bar {
CODE: many lines of code here;
}
}
</code>