in reply to First Unix Admin Script - Request for Constructive Critisism
Another problem: You don't test for success when you open MPCFG, and you open it without closing it. You could run out of open file handles, for one thing. Packages IO:File or FileHandle should be preferred for file handles; if you put them in my variables they close themselves.
Some of the other things I noticed are a matter of style. I would combine the print messages before "die" with the die command itself. You print both ordinary trace messages and errors to STDOUT. Since this is a system utility you might want better control over logging and message levels; see Log::Log4perl.
But please "use strict"!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: First Unix Admin Script - Request for Constructive Critisism
by grantm (Parson) on Feb 08, 2003 at 20:38 UTC | |
by D.Millin (Beadle) on Feb 08, 2003 at 21:13 UTC | |
by grantm (Parson) on Feb 09, 2003 at 02:55 UTC |