![]() |
|
Think about Loose Coupling | |
PerlMonks |
Re^2: Differ. array and Listby tphyahoo (Vicar) |
on Apr 26, 2005 at 14:27 UTC ( #451588=note: print w/replies, xml ) | Need Help?? |
Hope this isn't flogging a dead horse, just wanted to express this in a way that is clear to me.
"Context" in perl means, you have a line of code with a function that returns something, ie an lvalue -- for "left value" because what gets returned is on the left side of the expression. The function can behave differently, depending on what gets returned. If it's returning a scalar value it's scalar context, if it's returning an array value it is list context, or array context (same thing). So, as far as "context" is concerned, array and list are the same thing. But, there are places where the argument to a function has to be an array and not a list. So something like this could happen:
Right? Or wrong?
In Section
Seekers of Perl Wisdom
|
|