my $csv; eval {require Text::CSV_XS}; if(!$@){ $csv = Text::CSV_XS->new; }else{ require Text::CSV_PP; $csv = Text::CSV_pp->new; }