You can use a semicolon in the prototype to indicate the end of the required parameters:
sub someFunction($$;$) {
  my ( $oblig_param1, $oblig_param2, $option_param ) = @_;
  ...
} 
; is optional before a @ or %, which, according to the docs, "gobbles up everything else". 
 
No comments:
Post a Comment