H
Hemant Shah
Folks,
How do I break out from a nested subroutine to the outside of parent
subroutine?
# ----- Module2.pm
sub Function2()
{
sub Function3()
{
If certain condition is met go back to Function1.
How do I return to Function1 from here?
}
Some perl code.
Function3();
More perl code.
}
# ----- Module1.pm
use Module2;
sub Function1()
{
Module2::Function2();
How do I get here from Function3()?
More code.
}
# ----- Main Program
use Module1;
Module1::Function1();
More code.
Thanks.
--
Hemant Shah /"\ ASCII ribbon campaign
E-mail: (e-mail address removed) \ / ---------------------
X against HTML mail
TO REPLY, REMOVE NoJunkMail / \ and postings
FROM MY E-MAIL ADDRESS.
-----------------[DO NOT SEND UNSOLICITED BULK E-MAIL]------------------
I haven't lost my mind, Above opinions are mine only.
it's backed up on tape somewhere. Others can have their own.
How do I break out from a nested subroutine to the outside of parent
subroutine?
# ----- Module2.pm
sub Function2()
{
sub Function3()
{
If certain condition is met go back to Function1.
How do I return to Function1 from here?
}
Some perl code.
Function3();
More perl code.
}
# ----- Module1.pm
use Module2;
sub Function1()
{
Module2::Function2();
How do I get here from Function3()?
More code.
}
# ----- Main Program
use Module1;
Module1::Function1();
More code.
Thanks.
--
Hemant Shah /"\ ASCII ribbon campaign
E-mail: (e-mail address removed) \ / ---------------------
X against HTML mail
TO REPLY, REMOVE NoJunkMail / \ and postings
FROM MY E-MAIL ADDRESS.
-----------------[DO NOT SEND UNSOLICITED BULK E-MAIL]------------------
I haven't lost my mind, Above opinions are mine only.
it's backed up on tape somewhere. Others can have their own.