use strict ; use warnings ; use IO::Uncompress::Bunzip2 qw(bunzip2 $Bunzip2Error) ; use IO::File ; my $input = new IO::File " \$buffer or die "bunzip2 failed: $Bunzip2Error\n"; #### use strict ; use warnings ; use IO::Uncompress::Bunzip2 qw(bunzip2 $Bunzip2Error) ; use IO::File ; my $input = new IO::File " $buffer or die "bunzip2 failed: $Bunzip2Error\n"; print @{$buffer}; foreach (@{$buffer}) { # do something }