How do i reformulate a string in perl?
For example consider the string "Where is the Louvre located?"
How can i generate strings like the following:
"the is Louvre located"
"the Louvre is located"
"the Louvre located is"
These are being used as queries to do a web search.
I was trying to do something like this:
Get rid of punctuations and split the sentence into words.
my @words = split / /, $_[0];
I don't need the first word in the string, so getting rid of it.
shift(@words);
And then i need move the next word through out the array - not sure how to do this!!
Finally convert the array of words back to a string.