in reply to Re^2: call external sub ref from method in single line
in thread call external sub ref from method in single line

I noticed that too, but I don’t see it documented. The closest I’ve come are two references to eliminating arrows between “brackets subscripts” — perlref#Using-References (3) and perlreftut#Arrow-Rule. Or does a pair of parentheses () also count as a “subscript”?

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

Replies are listed 'Best First'.
Re^4: call external sub ref from method in single line
by AnomalousMonk (Archbishop) on Oct 05, 2015 at 14:10 UTC
    ... does a pair of parentheses () also count as a “subscript”?

    I've always assumed this is so and I've never encountered a counterexample, but this may just be because I almost always, if not always, use the
        $reference->{any}[$number]{of}[$levels]->();
    form; it seems more clear and the other form makes me just a bit nervous.

    Update: Perhaps my fondness for the form exemplified above has to do with the fact that I will often try to shorten and self-document my code by using intermediate variables:
        my $cr_that_does_something = $reference->{any}[$number]{of}[$levels];
        ...
        $cr_that_does_something->('foo');
        ...
        $cr_that_does_something->('bar');
    The  -> arrow is, of course, always needed here (if you don't use a sigil!).


    Give a man a fish:  <%-{-{-{-<