Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Function Prototypes

by muba (Priest)
on Nov 24, 2015 at 01:37 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-19 17:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found