Hi I'm trying to remove to analyze two successive lines in a row and remove one of them if they say the same thing, like so...based on different beginning charactes
sample input: B water C water if so, then only keep B water and discard C water I tried doing so with this snippet, but it wasn't exactly working as scheduled I thought I would force analysis after the one time through the while, before the variables were changed in the second iteration of the while, but this was printing them way too many times!!! can someone please help an otherwise distressed individual. while(<I>) { $b =~ s/B //; $c =~ s/C //; if ($b eq $c) { print "B $b"; } elsif ($b ne $c) { print "B $b\n"; print "C $c\n"; } if (/^B .*/) { $b = $_; } elsif (/^C .*/) { $c = $_; } } __________________________________________________ Do You Yahoo!? Yahoo! Sports - sign up for Fantasy Baseball http://sports.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]