$~identifier usually works. $~sockname doesn't work.