Sorry for a spelling mistake. My last sentence should be read like this :

It will only print the last line of your file. If that is the case you have to read the filehandle through a while loop.