# --- Part one --- @single = qw(I sit here and think- what the-hell am i doing with perl?); foreach (@single) { s/[,.?-]//g; # Updated: strip punctuation print "$_\n"; } # --- Part two --- $a= "I sit here and think- what the-hell am i doing with perl?"; $a=~ s/[,.?-]//g; print "$_\n" for $a =~ /(\w+)/g;