in reply to Maintaining strict refs while Binding a set of variables to @_ or dying if they are not defined

Have you considered using a hash? This code meets both of your stated requirements:
sub file_name { my %args; @args{qw/client_number MM DD S/} = @_; for (keys %args) { defined($args{$_}) or die "\$$_ not defined"; } local $"; "I@args{qw/client_number MM DD S/}"; }
You could even put the for loop in a separate subroutine and call it from all your subroutines where you want to verify the arguments.
  • Comment on Re: Maintaining strict refs while Binding a set of variables to @_ or dying if they are not defined
  • Download Code