in reply to how do I shorten code
More important than shortening the code above is learning the important of including full information in error messages as described in perlstyle. Also include them on every system command - including every open. It is also good to get in the habit of strict.pm and declaring your variables.
None of these will shorten your code. All will improve it. And that is more important.
|
---|