Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^3: I don't understand this grep

by gwadej (Chaplain)
on Nov 05, 2008 at 18:11 UTC ( [id://721754]=note: print w/replies, xml ) Need Help??


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

Well, that won't work if $self->channels returns a list, which seems likely, based on the name.

Update: Need to engage eyeballs before fingers. Thanks massa and jwkrahn for an appropriate whack on the side of the head.

G. Wade

Replies are listed 'Best First'.
Re^4: I don't understand this grep
by jwkrahn (Abbot) on Nov 05, 2008 at 18:37 UTC

    That should work fine.   What makes you think that it won't work?

Re^4: I don't understand this grep
by massa (Hermit) on Nov 05, 2008 at 19:00 UTC
    ??!!!
    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 (κς,πμ,πλ)

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

      g_White

      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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://721754]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2025-12-17 03:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (98 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.