Another good idea, less perl centric, but effective nonetheless, however for mssql there's only ltrim and rtrim and in this case I think it would be rtrim, which I happen to use a lot with this particular database and should've thought of that strait away. Regardless, I'm happy I learned about the chopblanks setting, albeit I still think that should be the default...