use strict; use warnings; my @input = ; # Take in the entire file my $count = chomp @input; print "Characters removed: $count\n"; __DATA__ This is some text Each line has a newline That makes 3 total