well, i am trying to do that but if i just leave the loop in the main code to be executed, it works np. as soon as i put the loop into a function and call it, invalid argument error.
$HTTP_GET_VARS and $HTTP_POST_VARS are only Global to the script, but not to functions. you don't have to pass them. What you could do is 1 of 2 things.
inside the function, before the loop, declare global $HTTP_POST_VARS
The other option is to use $_POST if your version of PHP supports it. IT is a 'superglobal' and available everywhere without being declared, including functions.
Warning: if you have checkboxes in your form that are the same name (a checkbox group) make sure that in the name attribute for the input tag you include the []. so for example:
<input type="checkbox" name="groupname[]" value="thisvalue">
Then in your php code, either explicitly look for that field or use is_array in the loop that is going through the input.
BTW - I also made the jump from perl to PHP, and I'm liking PHP very much. Pretty easy transition as the 2 languages have a lot in common.