in reply to stop me from embarrassing myself

Couple more points apart from those already mentioned:

  1. Where you have
     if ($opts{h} || $opts{u})  { exec "perldoc $0" };
    
    you might want to check out the Pod::Usage module. For example (copied straight from the docs)
     use Pod::Usage;
     use Getopt::Long;
     ## Parse options
     GetOptions("help", "man", "flag1") || pod2usage(-verbose => 0);
     pod2usage(-verbose => 1)  if ($opt_help);
     pod2usage(-verbose => 2)  if ($opt_man);
     pod2usage(-verbose => 2, -message => "$0: $error_msg.\n")
         if $some_error
    
    The neat thing about this module, is that it can handle your 'usage' message (runrig), or display a full man page without you having to do it your self, or setting off an exec to do it for you.

  2. You having the following
     if ($opts{f})             { $conf = $opts{f} };        
     # if no conf file specified, use "/etc/errreporter.conf as
     # the default ...
     unless ($conf) { $conf = "/etc/errreporter.conf" 
    
    Simpler (or at least more idiomatic) may be
     $conf = $opts{f} if exists $opts{f};
     $conf ||= "/etc/errreporter.conf";
    
    or even
     $conf = $opts{f} || "/etc/errreporter.conf";
    
    Mind out for the gotcha though... $conf will get set to the default if $opts{f} doesn't exist, isn't defined, or if it is just logically false (0 or empty string)

  3. You might want to load your config file using require. Its a lot safer, more robust, more portable and just plain easier

  4. You seem to be fond of using regexps for testing string equality:
     if ($identifier =~ /$_/)...
     if ($ignore =~ /yes/)...
    
    What's wrong with plain old
     if ($ignore eq 'yes')...
    
    That's what 'eq' is for

Good luck with it :)

Update corrected $ignore eq /yes/ to $ignore eq 'yes'. Thanks chipmunk for pointing that out... it was a typo... honest!

Replies are listed 'Best First'.
Re: Re: stop me from embarrassing myself
by blueflashlight (Pilgrim) on Feb 28, 2001 at 00:15 UTC
    whew! the learning never ends! I've used (most) of your suggestions, and if this stuff keeps up, I may actually become a half-decent perl person someday!

    thanks so much to you, and everyone who has helped me out with this.

    -s-
Re: Re: stop me from embarrassing myself
by blueflashlight (Pilgrim) on Feb 28, 2001 at 00:21 UTC
    about the using "require" suggestion; I did read in my (camel | llama) book the very same thing. I ran into some problems, though when running under different versions of perl (5.5x vs. 5.6), and using the "cat" method worked everywhere.

    I don't remember exactly what went wrong, I figure that since the script is only useful on aix, if /usr/bin/cat isn't there, there are bigger problems. :-) (i've added the full path to cat, now, just in case.)

    -s-