print "Enter words separated by commas."; chomp(my $answer=); die "Invalid input" if $answer =~ tr/a-zA-Z,//c;