in reply to set context for method's return values

Your code:
print(split(",", "A,B,C,D")[2]);
Yields:
syntax error at XXX.pl line YYY, near ")["
I think what you want is:
print "",(split(",", "A,B,C,D"))[2];
print can take a file handle as an optional arg and this can be confusing.
putting a dummy null string in front disambiguates this. The split creates a list, put the list into paren and use the bracketed 2 to get C.

Basically don't put a Perl variable or a function call immediately after the keyword "print". Adding more parens is a possible solution, but I prefer the above. Mileage varies.