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?
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|