in reply to Re: Difference between foreach and grep
in thread Difference between foreach and grep

Dear Monk, Comparing "grep" and "foreach" which one is efficient for looping?
  • Comment on Re^2: Difference between foreach and grep

Replies are listed 'Best First'.
Re^3: Difference between foreach and grep
by matze77 (Friar) on Dec 06, 2008 at 11:17 UTC

    As said before by many others perhaps you could describe a scenario which explains what you want to achieve, with maybe a short example then it would be easier to help you ...
    A bad example: You could also ask: which is the best editor? (For what? hmm uh?)
    Posting on PerlMonks
    But it breaks down simple to this imho:
    If asking questions its best to read it again and try to imagine the point of view from a possible helper:

    Does my question contain all that is needed to answer it from the "other side"
    without knowing what i know (and maybe forgot to write down), imagine people dont know what your current problem does look like -they also dont know your level of experience- they only see what you write, which information you provide ...

    If you are unsure if your question is too detailed (which doesnt seem to be your general problem ;-) you could provide:

    Here is a short explanation: " ... " (Try to give a quick overview, for the impatient reader).After that you could go in more detailed: Here are more details regarding my problem " ... " Maybe with "Read more" tags ...

    hth MH
Re^3: Difference between foreach and grep
by Lawliet (Curate) on Dec 06, 2008 at 04:43 UTC

    Well that depends on the reason for looping. We still need more information.

    I'm so adjective, I verb nouns!

    chomp; # nom nom nom