Sorry, I forgot to define the array when I type the code here.
use strict ;
use warnings ;
use IO::Uncompress::Bunzip2 qw(bunzip2 $Bunzip2Error) ;
use IO::File ;
my $input = new IO::File "<tmp.bz2" or die "Cannot open 'tmp.bz2':
+ $!\n" ;
my $buffer = \@apple;
bunzip2 $input => $buffer or die "bunzip2 failed: $Bunzip2Error\n
This is the code I wrote to read a txt contain in tmp.bz2 which contain:
and supposed to output:
but it doesn't work.