Reading the name of a file in a .gz

From: Yoda Pugsley (here_at_there.com)
Date: 04/08/04


Date: Thu, 08 Apr 2004 19:32:32 GMT

Hello,

I need to read the name of a file inside a .gz. I know it should be the
zipped name - .gz, but the filenames are long and truncated sometimes. In
perl, what is the command to read the gzip -l into a variable? Something
like

my ($filename)

$filename == gzip -l ~/cdr/file.gz

will that work, or something like it?

Thanks,
JH



Relevant Pages