> This is one of my attempts to make this work.  The method that returns the
> scalar works.  That method that returns the pointer to the array, doesn't
> work.

Kaleb,

You only need to declare the 'person' package once.  I see you have this listed before 
every
method.
 
Looking at your actual code, it appears that you are not using strict as there appears 
to be a
typo in your code which strict would have caught instantly, thus telling you what was 
going on. 
In the following line, 'members' should probably have a dollar sign in front of it.  
That looks
like your main problem because you're not creating an array ref to toss to 'person'.

    for($i=0; $i<10; $i++){members->[$i] = $i;}

So, in cleaning up the code we get the following:

    use strict;

    my $sname = "CblInfo";
    my $members;
    for my $i ( 1 .. 10 ) {
        $members->[$i] = $i;
    }
    my $a = person->new ( name  => $sname,
                          array => $members);

    my $name = $a->get_name;
    my $mem  = $a->get_array;
    print "$name\n";
    for my $i ( 0 .. 10 ) {
        print "$mem->[$i]\n";
    }

The above code is untested, but it should work.

Cheers,
Curtis "Ovid" Poe

=====
Senior Programmer
Onsite! Technology (http://www.onsitetech.com/)
"Ovid" on http://www.perlmonks.org/

__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to