perl script.pl test2.csv > final.csv #### use strict; use warnings; while (my $line = <>) { chomp $line; print "$line", " ,UF, A, Y, 9, U\n"; }