## this is an example, works just as well if these arrays come from a require'd file my @array1 = qw(a b c); my @array2 = qw(d e f); ## again, just an example, works just as well if this comes from GetOpt my $opt_f = '@array1, @array2'; ## here is the magical and evil eval my @combined = eval "$opt_f"; print "@combined\n";