in reply to Requires explicit package name

The stricture enforces the user to declare the variable before use.
* Declare $pid first.
* $houtputfile is a file handle it seems, but you are trying to concatenate with $pid.
* what *HFILE refers to.
* $hfiles{$pid} ----where is this "hfiles" variable defined.
Now debug and rewrite your code.