in reply to Growing strings, avoiding copying and fragmentation?

For what it's worth, I usually do something like this to read compressed files:
if( $file =~ [\.(Z|gz)] ) { open($fh, "gunzip -c $file |" or die "Couldn't fork gunzip: $!"; } else { open($fh, $file), or die "Couldn't open $file: $!"; }
Sure, it's less portable, but IMHO, a whole lot easier to maintain. If you don't have gunzip, you can always use zcat.

thor