There are several ways to handle this problem. First of all you have to download the gzip file into local directory. You can use curl, lwp, or wget. Just download this and save into a file, for example "temp.xml.gz". A wget command you can use from your script.
system('wget "http://www.example.com/file.xml.gz" -nv');
After downloading the script, use gunzip over the file. If you are using linux, that case you already having gunzip installed. If you are using windows, that case you have to get the gunzip.exe. You can download this unxutils.sourceforge.net and place to the script directory. A gunzip command will be,
system("gunzip -f temp.xml.gz");
This way you can handle gz files from any website.