in reply to Alternative to IO::Uncompress::Bunzip2

Yes - see the pipe form of open. You need the bunzip2 executable installed for that:

my $cmd = sprintf 'bunzip2 -cd "%s"', $filename; open my $fh, "$cmd |" or die "Couldn't launch [$cmd]: $!"; binmode $fh; print while <$fh>;

Update: Fixed missing filename argument, spotted by AnomalousMonk

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.