I try to delete all strings if their first or last word is one of this list of words : "the", "i", "in", "there", "this", "with", "on", "we", "that", "of"
For example if i have this string in an input file "with me" this string will be removed,
Example: input
"the european union"
"would like to"
"would like"
"of the european"
"the european parliament"
"the member states"
output
"would like to"
"would like"
Your title includes the word perl. If you are required to use language perl, please state why. If this is homework or for a class, then see the sub-forum http://www.unix.com/homework-and-coursework-questions/ , follow the rules, and ask your question there.
If not required to use perl, there are many other possible solutions.
Does your data file actually have quote characters around the lines?
It's usually a good idea to say what OS you are using, as well as responding to balajesuri's question about Please let us know what you have tried. .