use strict; use warnings; sub main { my $input = "CSV_File.csv"; unless(open(INPUT,$input)) { die "Cannot open $input \n"; } while(){ chomp $_; my @values = split',',$_; foreach my $val (@values){ print "$val "; } print "\n"; } close INPUT; } main();