in reply to Maintaining strict refs while Binding a set of variables to @_ or dying if they are not defined
Why not go the following route?
sub file_name { my ($client_number, $MM, $DD, $S) = @_; my @varnames = qw($client_number $MM $DD $S); for (my $i=0; $i <= scalar @_; $i++) { die "$varnames[$i] not defined\n" unless defined($_[$i]); } "I$client_number$MM$DD$S"; }
Philosophy can be made out of anything. Or less -- Jerry A. Fodor
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
| A reply falls below the community's threshold of quality. You may see it by logging in. |