thanks for the replies! all very helpful. I think that this last was what I was most curious about though - how to print the key, given the value.
but what happens where there are two keys that share the same value?
and what is the 'l' option in the shebang ??