|go ahead... be a heretic|
Is this concise enough? (code)by deprecated (Priest)
|on Jun 24, 2001 at 01:30 UTC||Need Help??|
deprecated has asked for the
wisdom of the Perl Monks concerning the following question:
Yes, I am using perl where I could just be using the shell. In this case, I am using perl because it is a little less processor intense (fewer processes forked), and a lot clearer from a readability point of view.
The application is a wrapper around a tape stacker. I want to read in six tapes from a stacker, in sequence, using the command `mtx`. I'm reading its output, here:
I can then figure out which tape is in the drive and which ones need to be done. Anyhow, the code that I have created to parse that information is here:
This is pretty cool, but I dont get a feeling of satisfaction from it. What would be a more concise yet still clear way to do this?