Re: dereferencing an array

2001-02-08 Thread Ron Grabowski
> 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

Re: dereferencing an array

2001-02-08 Thread Chuck . Hirstius
>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

dereferencing an array

2001-02-08 Thread Martin, James S.
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