Kyle Lampe wrote:
Hello!
Hi

I've got a quick perl question for you. I'm writing a script that compares two xml files, ignoring one certain tag.

The problem I have is I want to get the output from two files simultaneously.

What I'm trying is:

while ( $lineFile1 = <XMLFILE1> && $lineFile2 = <XMLFILE2> ) {
try:
while ( $lineFile1 = <XMLFILE1>, $lineFile2 = <XMLFILE2> ) {
    if ( $lineFile1 =~ /$IGNOREXML/ ) {
        print "Ignoring: ", $lineFile1;
    }
    else {
        if ($lineFile1 eq $lineFile2) {
        print "Same: ", $lineFile1;
        }
        else {
        print("Not the same\n");
        print($lineFile1);
        print("\n");
        print($lineFile2);
        exit;
        }
    }
}

But it's complaining about my &&.  How can I increment the contents of
2 files like this at once?
Why the logical and?

Thanks!

_Kyle

-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to