Thanks for your reply. I had missed the required stored procedure call code. I have corrected that.
Even after changing according to your advice I get the error as "bind_param_inout needs a reference to a scalar value at storedproc.pl line 23."
Note the difference between your bind_param_inout calls and mine. See the backslash before the variable names in mine? That says "pass a reference to this variable", not the varable itself.