in reply to archives etc

I know it's not what you asked, but instead of backticks, I like this method:
foreach (@ARGV) { if ($_=~/\.z$/) { $_="gunzip -c $_ |"; } }
Putting that in front of your main loop means your while (<ARGV>) loop can process gzip files transparently.

Replies are listed 'Best First'.
Re: Re: archives etc
by eserte (Deacon) on Apr 21, 2004 at 13:01 UTC
    .z? You actually remember the times when this was the default for gzipped files? :-)
Re: Re: archives etc
by CassJ (Sexton) on Apr 21, 2004 at 11:53 UTC
    ooh, clever. But that only works if I'm opening the files in perl? What I want to do is unpack them into a directory for R (stats package) and as far as I know there's no way of passing a perl file directly to an R script. So it won't work in my case? Or have I misunderstood what it's doing?

    Cxx