So lets say I had the string.
$my str = "Hello how are you today. Oh thats good I'm glad you are happy. Thats wonderful; thats fantastic."
I want to create a hash table where each key is a unique word and the value is the number of times it appears in the string i.e., I want it to be an automated process.
my %words {
"Hello" => 1,
"are" => 2,
"thats" => 2,
"Thats" => 1
};
I honestly am brand new to PERL and have no clue how to do this, how to handle the punctuation etc.
UPDATE:
Also, is it possible to use
split('.!?;',$mystring)
Not with this syntax, but basically split at a . or ! or ? etc.. oh and ' ' (whitespace)