in reply to Re: Re: Default subroutine parameters (boo)
in thread Default subroutine parameters
mysub(foo => 0, bar => 1, baz => undef); sub mysub { my %defaults = qw(foo 9 bar 8 baz 7); my %args = (%defaults, @_); print "Foo: $args{foo}, Bar: $args{bar}, Baz: $args{baz}\n"; }
But it's inspired me to see if I can modify it to suit my needs. Thank you!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Default subroutine parameters (boo)
by Fletch (Bishop) on Apr 23, 2002 at 16:24 UTC | |
by thelenm (Vicar) on Apr 23, 2002 at 16:32 UTC |