I changed my code so the variables aren't references; sub EventList { my ($class, %arg) = @_; # load of code here return ([EMAIL PROTECTED], $startdate, $enddate); }
And then called it like so: my @tempres = $event->EventList(skip=>0, max=>10); my $EventList = @tempres[0]; my @EventList = @{$EventList}; my $startdate = @tempres[1]; my $enddate = @tempres[2]; Angie >>I have an package called "Event" >> >>in it I have a subroutine called EventList >> >>I want to return an array and 2 scalars. >> >>sub EventList { >> my ($class, %arg) = @_; >> # load of code here >> return ([EMAIL PROTECTED], \$startdate, \$enddate); >>} >> >>So far so good (I think) >> >>but I don't seem to be able to access it. I've tried all sorts: >> >>my $event = Event->new; >>my @tempres = $event->EventList(skip=>0, max=>10); >>my $startdate = $tempres[2]; >>my $enddate = $tempres[3]; >> >> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]