Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: Function Prototypes

by muba (Priest)
on Nov 24, 2015 at 01:37 UTC ( #1148465=note: print w/replies, xml ) Need Help??

in reply to Function Prototypes

If coded as is (below), the sub works;

Cool cool.

There's a lot of things to say about the way Perl passes arguments into a subroutine through this weird @_ variable. But don't you just love it how it allows you to write stuff like my %hArgs = (default1 => "foo", default2=> "bar", @_); ... inside a sub, and then call that sub with ConfigRead default2 => "banana juice", extra => "new key/value pair w00t w00t"; and it just works and you preserve one default setting, override another, and even introduce a third setting? It's things like that make adore this language.

So thumbs up to you, KimberTLE, for coming up with a solution that works. And I don't mean that sarcastically, I am indeed sincere. So... is there a question?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1148465]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2021-03-02 05:23 GMT
Find Nodes?
    Voting Booth?
    My favorite kind of desktop background is:

    Results (38 votes). Check out past polls.