Re: references and objects
From: Angie Ahl (angie_at_vertebrate.co.uk)
Date: 11/14/03
- Next message: Amit Phatak: "Re: peeking at the top or bottom of an array"
- Previous message: Angie Ahl: "references and objects"
- In reply to: Angie Ahl: "references and objects"
- Next in thread: Rob Dixon: "Re: references and objects"
- Reply: Rob Dixon: "Re: references and objects"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 14 Nov 2003 11:55:07 +0000 To: Perl List <beginners@perl.org>
Sorry I forgot to mention that the package IS an object ;)
on 14/11/03 angie ahl said:
>Hi everyone
>
>I'm failing to find something in the manuals (or at least the bit I'm
>missing ;)
>
>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 (\@list, \$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];
>
>could anyone give me a clue as to how I would get 2 scalars and an
array
>out of an object and what kind of syntax to use to access the returned
>values. I'm just missing something I'm sure.
>
>Thanks
>
>Angie
>
- Next message: Amit Phatak: "Re: peeking at the top or bottom of an array"
- Previous message: Angie Ahl: "references and objects"
- In reply to: Angie Ahl: "references and objects"
- Next in thread: Rob Dixon: "Re: references and objects"
- Reply: Rob Dixon: "Re: references and objects"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|