in reply to filehandle in warning not what I expected...

I think that you're throwing off Perl's line number counters by using seek.

But if your files are not "that big", why do you search through the $interface_data every time on disk instead of reading it once into a hash?