in reply to Using unix commands in perl?
I'm pretty sure that the rest of the code I posted would be fairly familiar to most Java programmers.
-David