First of all a gzip file is a compressed version of a single file. From your description you most likely have a tar archive which was then compressed.
The second point is that you will have to decompress it, either in memory or a temporary file.
You will definitely not be able to read it row by row.
Take a look at Tie::Gzip for the handling of compressed files and at Archive::Tar for tar archives.