http://qs321.pair.com?node_id=177812


in reply to Re: Accessing Arrays and Lists
in thread Accessing Arrays and Lists

Just to clarify. Parens immediately after a function are taken as delimiters for the argument list (as you rightly explained) --- but that has nothing to do with Perl's prototypes:

sub foo { # no prototype here return ('a','b','c'); } # print (foo)[0]; # same error print +(foo)[0];

I also show the unary + op as a better generalization of your last example --- it disambiguates without imposing numeric context.