This is not the best way to address this problem of CGI parameter parsing. Your routine will fail for any form where the form checkbox values may contain commas - This is because when you go to split the input into an array, you will end up splitting the passed checkbox value into two separate array elements. This is another reason why you should not hand-roll your own CGI parameter parsers (unless you
really know what you are doing and have a justifiable reason to do so -- Personally, I cannot think of any such reasons, but am willing to leave the door open on this on :-)
Furthermore, the context of the question was to do with the usage of CGI.pm, by far the preferred manner by which to parse CGI parameters - For further details on why this is the case, please see use CGI or die;