Hello,
I have a variety of hashes that have similar content:
$h = {
'foo1' => 'bar',
[...]
'foo99' => 'baz',
'foo100' => 'h',
}
$g = {
'foo1' => 'bar',
[...]
'foo99' => 'baz',
'foo100' => 'g',
}
I'd like to have a function or similar mechanism:
$h = helper_module::get_hash_defaults()
but be able to override various keys/parameters in the get_hash_defaults function:
$h = helper_module::get_hash_defaults(
'foo100' => 'h',
)
$h = helper_module::get_hash_defaults(
'foo100' => 'g',
)
but functions only take parameters by position.
Does anyone have any clever hacks I could try to mimic passing arguments by name?
Thanks for any help!
-m