|
|
| Perl: the Markov chain saw | |
| PerlMonks |
Re: How to display the .pl process in command lineby bms (Monk) |
| on Mar 27, 2012 at 07:47 UTC ( #961868=note: print w/ replies, xml ) | Need Help?? |
|
Well, I have a couple recommendations. For one, please organize your code. Remember DRY(Don't Repeat Yourself), there is a lot of code duplication in that snippet. And also think about logically grouping your code. Secondly(and most importantly), I think you want IO::Tee.
So, essentially, IO::Tee allows you to write to multiple file handles simultaneously. You could use a second print statement with just a string to accomplish the same result. Or select. Plus a bunch I can't think of right now. Always a lot of choices.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||