perl -i -pe 's/^\s*\'.*//' targetfilename