Quote:
Originally Posted by photon
strcmp in perl is
if( $data1 eq $data2 ){
}else{
}
Interesting, I sorta found that out, but at first I was using != for not equal. Error city. Anyway, so that is how my script looks. However, all that is output now is
<
>
<
>
<
>
Here is what my script looks like now:
open(DATA1,"ping1.txt");
open(DATA2,"ping2.txt");
$data1 = <DATA1>;
$data2 = <DATA2>;
while ($data1 || $data2) {
if ($data1 ne $data2) {
else print "<$data1";
print ">$data2";
}
$data1= <DATA1>;
$data2= <DATA2>;
}
Like I said, all i get now is
<
>
<
>
in a repeating pattern that never ends. Should I put an EOF in there somewhere? Another question is I KNOW the files are different because i made some changes to test them
I know I am overlooking something here...
Thank You for your inputs.
Joe