My code won’t run the last line right before ‘ exit; ‘ and I have no clue why. I tried to put an additional printf $fh line before exit, but that didn’t work either; it would not print either line. Everything else prints fine except the last print statements before the exit.
Any clue why this happens? Or better yet, how to fix or work around it?
if($i>0 && $i<3) { printf $fh 'Partial match found.\n'; if($matched_uid){printf $fh 'UID #: '.$arguid.' exists.\n';} if($matched_id){printf $fh 'ID #: '.$argid.' exists.\n';} if($matched_uname){printf $fh 'Username: '.$arguname.' exists.\n';} printf $fh 'Aborting.'; exit; }
EDIT:
Part of the code I copied contained this
select $fh; $| = 1; #set auto flush
Maybe this is why my results couldn’t be duplicated….
Try ‘Aborting.\n’
This looks like a buffering issue.