in reply to Looping through a file
Unless $PARTS and $ordnum are both numbers, you probably want to compare them using
if ($PARTS eq $ordnum) { ...
(eq is for comparing strings, such as "printfileA")
Similarly, as $found seems to be used in a boolean fashion (0=false/1=true), it would suffice to say
unless ($found) { ...
(Not sure if that helps, but other than that, I can't say much, because even after having read your post twice, I'm still not quite sure what exactly you need to do... — but as always, that could also be due to a problem on my side ;)
|
|---|