in reply to Re: If/else within a foreach loop to check strings within an array
in thread If/else within a foreach loop to check strings within an array

> Whilst for the very short input in your example choroba's solution is perfectly fine,

Read again! No big difference to your approach.

Cheers Rolf

( addicted to the Perl Programming Language)

  • Comment on Re^2: If/else within a foreach loop to check strings within an array

Replies are listed 'Best First'.
Re^3: If/else within a foreach loop to check strings within an array
by BrowserUk (Patriarch) on Oct 19, 2013 at 23:01 UTC

    You're correct. My mistake.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    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.