Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks,
How do I keep a script from going on before a subprocedure is done? I have a script in which a subprocedure actually does most of the work, so it takes a while, and it doesn't return anything... (I coded it as a subprocedure because there are two variants with different arguments). But I need do some cleaning up after the sub ends, and at the moment the "cleaning up" happens too early, so that the directories for the temporary data are deleted :-/
I'm a beginner in programming and I'm not sure how to approach this or what to google for. Do I need to introduce a return value as a "placeholder", or is there a more natural way?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Keeping a script from going on before a sub is done
by roboticus (Chancellor) on Jun 24, 2012 at 20:07 UTC | |
by Anonymous Monk on Jun 25, 2012 at 06:52 UTC | |
|
Re: Keeping a script from going on before a sub is done
by CountZero (Bishop) on Jun 25, 2012 at 06:44 UTC | |
by Anonymous Monk on Jun 25, 2012 at 13:08 UTC |