Yes, you can, but one caveat: I think they lose their "magic" when they become hash keys, but if you try to assign them to a hash key, they all become simple strings that would work fine. You can't, as far as I know, take the result of
(keys(%hash))[0] and
print to it, because it's no longer a socket, but a string.
If all you're doing is storing information about your sockets, though, I think it should work fine as a hash key. Again, just don't try to use the keys of your hash themselves as if they were objects/sockets.