For instance in functional programming anonymous functions are passed around, even in arrays or hashes and then you might even want to assign further data to them. ... it's certainly not useless to do so.
I completely agree it is far from useless. But there should be no problem passing a reference to an arbitrarily complex data structure as the parameter of a named parameter and then accessing the data in any legal way whatsoever. (And of course, this works equally well with either of the techniques for passing named parameters described in the OP, so this whole, rather verbose sub-thread is actually a little bit OT.)

To verify my understanding of what you have written and to illustrate what I mean, an example:

>perl -wMstrict -le "my $funcs = [ sub { print q{i'm at index zero} }, sub { print q{and i'm at index 1} }, ]; add_func({ fns => $funcs, fn => sub { print q{i'm new here} }, at => 3 }); $funcs->[0](); $funcs->[3](); sub add_func { my %args = %{ shift() }; $args{fns}->[$args{at}] = $args{fn} } " i'm at index zero i'm new here
It wasn't clear that your problem is "what is it good for", you sounded more like "theres no difference".
There is, indeed, a vast difference between passing a reference as a named parameter name (i.e., a hash key) and passing a reference as the parameter (i.e., hash value). My problem with passing a reference as a name was squarely in the "what's it good for" camp.

In reply to Re^12: Preferred technique for named subroutine parameters? by AnomalousMonk
in thread Preferred technique for named subroutine parameters? by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.