May 14, 2013, 11:45 PM
if( $nodiff && $diff )
Re: [FishMonger] script not producing output
printf("\n%d : %x : Differences found\n", $pagecount, $pagenumber);
elsif( $ident and not $nodiff)
printf("\n%d : %x : No Differences found\n", $pagecount, $pagenumber);
This if statement is confusing me. (the script was given to me, I have no previous perl experience so bare with me, ive tried hard to understand)
If we start from the first looping, $nodiff should be evaluated to 1 if the strings match, while $diff should be 0 all the time (since it never changes right?) which means the first statement will allways be false (concidering the && operation). This begs the question, how anything will ever be evaluated as "differences found"?
 Another thing im wondering about is the !~.This kinda means if string 1 is not string 2; return true, right? (so the $nodiff should maybe be named $diff for clarity?)
As u can see im kind of clueless :< sry. Apreciate the help anyways!
(This post was edited by StaedarN on May 15, 2013, 12:14 AM)