I've got one function which I can't modify and in this function something like this is done
foreach my $param (@_) {
.....
$self->{'parameter'} = from_json ( $self->{'cgi'}->param('POSTDATA') );
function(para1, $self->{'parameter'})
function(para1, 1, 1, 1)
If $self->{parameter}
is an array reference, then you can include the dereferenced array and in most* cases, Perl will flatten the list.
$self = from_json ...; # $self->{parameter} = [1,2,3];
function($p1,@{$self->{parameter}}); # equiv to function($p1,1,2,3)
* - some cases where Perl won't flatten a list are functions that have a @
prototype or a Perl builtin function that expects an ARRAY
and not just a LIST