in reply to decompressing tar.Z files

I believe you can use Compress::Zlib to do this. There's a section in its perldoc about "Accessing Zip Files"