Forum Moderators: coopster & phranque

Message Too Old, No Replies

Converting param() to an array

         

csdude55

6:41 am on Dec 6, 2023 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I've been using this for several years to convert multiple param() to an array:

@moreArr = param('more');


It works fine, but I recently discovered a warning in my error log for it:

CGI::param called in list context


If this were a single variable then I'd use scalar(), but I need all of them in there.

I guess I could do something like this (not tested, just winging it for the thread):

@moreArr = map scalar(param($_)) => param('more');


Before I go down that particular rabbit hole, though, is there an easier way to do this?