> The code I am trying is something like this:
>
> @itemarray=@{$data->$item};
>
> foreach $DataItem(@itemarray)
>
> {
> print $DataItem . "\n";
>
> }
>
> Unfortunately this is not work.. I think it has something to do with scalars
What do you mean by not working? Are you getting wro
>I have a value $data->$item .. This may be just a single value, or it may
>return an array.
>
>In order to accomdate the two outcomes, I want to just treat it like an
>array and iterate through it. If it has one element, fine, print out that
>one element, but if it has more than one, iterate
I have a value $data->$item .. This may be just a single value, or it may
return an array.
In order to accomdate the two outcomes, I want to just treat it like an
array and iterate through it. If it has one element, fine, print out that
one element, but if it has more than one, iterate through