in reply to Growing strings, avoiding copying and fragmentation?
Sure, it's less portable, but IMHO, a whole lot easier to maintain. If you don't have gunzip, you can always use zcat.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: $!"; }
thor
|
|---|