I am having wall to wall carpet replaced. The current carpet has dark edges (dirt) along the baseboard. I recall either reading or hearing that caulking under the baseboards with a latex caulking before having the new carpet laid could eliminate this problem.
Answer:
It just might do that for you but you'll have to make sure the compound goes in under the baseboards or drywall at least 3/8". I would also want to use a compound that is a bit more elastic and a bit less prone to shrinking back than latex.