use Text::CSV_XS qw( csv ); use PerlIO::via::gzip; my $aoa = csv (in => "test.csv.gz", encoding => ":via(gzip)");