If I understand you correctly, tobyink's reply fits pretty well. One more thing to note, however, is that there already exists a plethora of Perl logging modules, many of which will probably do what you want.
If you're mainly doing this as a learning exercise, however, then, again, tobyink left you some valuable advice.
In reply to Re: Passing a variable recursively
by rjt
in thread Passing a variable recursively
by timtowtdi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |