in reply to Retrieving value from HTML->Javascript->Perl

Apart from your not using strict (which I and I should think everyone else round here would encourage you to do), I don't think there's a problem with your Perl. If you're outputting to a web browser you'll need
print $q->header, $partNumber;
but you probably knew this.

I think the problem is likely to be in your jscript, and two possibles are

George Sherston