> below is a snipet of the code.  the most relavant part.  when 
> i enter some bad data in or mysql has problems, it should go 
> to error_handler()  at the bottom of my script.  well it 
> does, then it returns unless i put an exit at the end of 
> error_handler.

How about:

mysub('param1','param2');
mysub('parma1','param2');

sub mysub {
  my ($p1,$p2) = @_;
  print "in mysub\n";
  $p1 eq 'param1' or err_h("invalid param: [$p1]\n") or return 0;
  print "passed: [$p1] [$p2]\n";
}

sub err_h {
  print $_[0] and return 0;
}

HTH,

 -dave



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to