in reply to Unique ID
ObPerl: You can also use a wrapper like (plug plug) SPOPS module to do this for you -- there is example code at this node.
Chris M-x auto-bs-mode