Ticket #287. It seems to work for me after fixing the includes.
Use product_name
Close STDIN ($fp) handle before returning back to shell. Major doh's.
Add $Id$ tags
Style clieanup.
Initial revision