in reply to Re^3: I don't understand this grep
in thread I don't understand this grep

??!!!
Yes it will work with channels returning a list, according to Conditional operator:
Scalar or list context propagates downward into the 2nd or 3rd argument, whichever is selected.
And it won't execute $self->level($level) once for each item of the returned list, which is good.

Now, the reason why channels is missing is because... well, gwhite didn't show any sub channels { ... } in the module... But he didn't state that it does not exist, either...

[]s, HTH, Massa (κς,πμ,πλ)

Replies are listed 'Best First'.
Re^5: I don't understand this grep
by gwhite (Friar) on Nov 05, 2008 at 19:21 UTC

    There is not a sub channels { ... } routine, or any list being created when the module is invoked.

    g_White
Re^5: I don't understand this grep
by gwadej (Chaplain) on Nov 05, 2008 at 19:28 UTC

    Brain cramp. I could have sworn there was still a $_ in the grep expression. Which would (of course) made your change completely different than the original.

    Ignore me, I need more sleep.

    G. Wade