in reply to Need help with and If Else structure.

You realize that the if (...) {...} else {...} is in the foreach block so that the value of $sss will reflect the status of the last $piece in @info only?

Another point: eq is case sensitive, i.e. "yes" is not equal to "YES". If you'd prefer a case insensitive compare, convert the variable to lowercase using the function lc.

Apart from that, there's no need for the double quotes around the variables, i.e. $ss = "$status"; and if("$ss" eq "yes") can be replaced by $ss = $status (although I don't see why you'd want $ss in the first place) and if($ss eq "yes".

Just my 2 cents, -gjb-

Replies are listed 'Best First'.
Re: Re: Need help with and If Else structure.
by ACJavascript (Acolyte) on Jan 01, 2003 at 03:26 UTC
    THANKS ALOT!!!!!!
    I put in the chomp,, and it worked great!

    Thanks alot guys/gals