sudo dscl localhost -create /Local/Default/Hosts/ridiculous.nonsense.monkeys IPAddress 192.168.0.1
Enter your password when asked, and you can now ping 192.168.0.1 with the name ridiculous.nonsense.monkeys
You can see the results of your work with:
dscl localhost -readall /Local/Default/Hosts
And to undo your handy-work:
sudo dscl localhost -delete /Local/Default/Hosts/ridiculous.nonsense.monkeys
P.S. You can see the results of your BSD flat-file method with this command:
dscl localhost -readall /BSD/local/Hosts