in reply to print vs push?
Unless you seek() back to the beginning @array will be empty since COMP will be sitting at the end of the file.