in reply to Re: Preferred technique for named subroutine parameters?
in thread Preferred technique for named subroutine parameters?
printsuse warnings; use strict; use Carp; func(one => 'uno', two => 'dos', three => ); sub func { croak "wrong number of arguments for func(); has to be even" if sc +alar(@_) % 2; my %args = @_; print "func: one translates to $args{one} \n"; }
wrong number of arguments for func(); has to be even at a.pl line 8 main::func('one', 'uno', 'two', 'dos', 'three') called at a.pl lin +e 5
|
|---|