Re: Problem using IF with AND

2001-10-31 Thread Richard J. Barbalace
Kurt writes: > if ($client ne $newclient and $method ne $newmethod){ > print "something\n";#I'll actually be > printing this to my report once I get this worked out > } > > Problem is that this seems to work for only the first set of variables and > ignores

Re: Problem using IF with AND

2001-10-29 Thread Tyler Longren
I think you're right. ;-) Tyler On Mon, 29 Oct 2001 20:40:28 -0800 Dave Turner <[EMAIL PROTECTED]> wrote: > I think ( and there's plenty who will tell you if I'm wrong... lol ) > that > you need to put it as: > > if (($client ne $newclient) && ($method ne $newmethod)) { > // blah bl

Re: Problem using IF with AND

2001-10-29 Thread Dave Turner
I think ( and there's plenty who will tell you if I'm wrong... lol ) that you need to put it as: if (($client ne $newclient) && ($method ne $newmethod)) { // blah blah blah } Otherwise I think it doesn't bother to look at the second if the first fails. Hope that helps. At 10:28 PM 10

Re: Problem using IF with AND

2001-10-29 Thread Tyler Longren
If I were you, I'd try using && instead of "and" in your if loop: if ($client ne $newclient && $method ne $newmethod) { // blah blah blah } I'm not even sure if that will work in perl. Who knows. Good luck, Tyler Longren On Mon, 29 Oct 2001 08:33:42 -0700 "Earthlink" <[EMAIL PROTECTED

Problem using IF with AND

2001-10-29 Thread Earthlink
The program I'm writing (my first in Perl) takes a log file and using a regex pulls out all lines that contains certain words and writes them to a file. Then I read in that file, seperate out the fields I want (IP address and method), and want to eliminate the duplicates, and add a count to show