Update: I now have an improved C version of this program: usbscale.
I got suckered into one of those hard-to-cancel Stamps.com trials. The upside is that they give you a $10 USB 5 lb. scale to use with their software. The downside is that they want you to only use it with their software, and the company that makes the scale has since taken down their free USB-scale program.
So, this little Perl hack reads from the Stamps.com scale by accessing the
hidraw# interface that Linux provides. In my case, I have
hidraw4 hard-coded into the script itself. Basically, it loops until it reads a good value from the scale, at which point it prints out the weight and exits.
Edit: This code is now a Gist on GitHub.