Perl-Sensitive Sunglasses | |
PerlMonks |
Re: "Indirect" object syntax?by Athanasius (Archbishop) |
on Nov 23, 2015 at 04:41 UTC ( [id://1148368]=note: print w/replies, xml ) | Need Help?? |
Hello muba, Here’s the official explanation, from perlglossary:
So in the case of $cgi = new CGI;, this is actually short for something like:
Does an expression such as $cgi = new CGI; violate the English rule that an indirect object is not present unless a direct object is also present? Yes, unless the (null) method arguments can be said to be “understood” in this case. (Cf. the sentence “Listen to me!” in which the subject “you” is also said to be “understood.”) Hope that helps,
In Section
Meditations
|
|