in reply to Not a GLOB reference

Please use <code> tags to format your code as described here.

You're trying to use the object returned by gzopen like a filehandle, but it's not; you should use the gzreadline method on the object. See the second example in the module's documentation. If you want a filehandle-like interface, take a look at IO::Uncompress::Gunzip.