northernbloke
Programmer
I am suffering badly,
What I am trying to do is pass a @array to a sub, but I want the @array to be obtained from 2 vars, like thus:
%arr_names = {
"01", "bill",
"03", "sam",
"06", "copies",
"08", "copies",
"09", "Steve" };
@arr_06 = ("John","Bill"
;
@arr_08 = ("John","Sam"
;
.
.
if ($arr_names{$who} == "copies" ) {
©_to(@arr_{$who});
}
lots of code is missing, $who is the key of arr_names.
basically, I want the sub to receive the contents of arr_06, or arr_08.
What have I missed,
Cheers for any guidance.
What I am trying to do is pass a @array to a sub, but I want the @array to be obtained from 2 vars, like thus:
%arr_names = {
"01", "bill",
"03", "sam",
"06", "copies",
"08", "copies",
"09", "Steve" };
@arr_06 = ("John","Bill"
@arr_08 = ("John","Sam"
.
.
if ($arr_names{$who} == "copies" ) {
©_to(@arr_{$who});
}
lots of code is missing, $who is the key of arr_names.
basically, I want the sub to receive the contents of arr_06, or arr_08.
What have I missed,
Cheers for any guidance.