|There's more than one way to do things|
Re: mysterious hash ref resultby BrowserUk (Pope)
|on Jan 12, 2007 at 13:44 UTC||Need Help??|
In a word, context. Try it like this:
Assuming that produces the desired result, the problem is that in your first example, you are calling $self->client->param( 'edit_usr_id' ) in a list context, whereas in your second example it is called in a scalar context.
self->client->param( .. ) probably finishes something like:
That is to say, it executes a bare return statement if the parameter does not exist. In a scalar context, a bare return will assign undef to the scalar (lvalue). In a list context, it will return the 'empty list' (usually denoted by ()), but when an empty list is incorporated into a larger list, it is folded to nothing. Essentially, it disappears. Eg:
In the former, sub x() is called in a list context, so the return statement returns the empty list and that get folded and disappears making no contribution to the state of @b.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.