I think you'd be better reorganising this. Formcgi.pl doesn't need to exist at all - this could simply be a static HTML form, as all it does is pass parameters, with no dynamic generation necessary. Then you could simply add the code in "getpart.pl" into "addrecord.pl" (as a GetPartNumber subroutine or something similar), return the value and write out to the db in one fell swoop.
in reply to perl form
As stated above though, CGI.pm would be of *great* help to you here, especially in the parsing of the parameters.