Re: Annoying HASH(0x...) in Output

2007-06-12 Thread Jenda Krynicky
From: "Tom Phoenix" <[EMAIL PROTECTED]> > On 6/4/07, GMan <[EMAIL PROTECTED]> wrote: > Things go smoothly for a while, and things seem quiet. Too quiet. Then... > > > sub addfriend { > > my ($self,$f) = @_; > > #dereference the array from the hash > > $fr = $self->{'_friends'}; > >

Re: Annoying HASH(0x...) in Output

2007-06-05 Thread [EMAIL PROTECTED]
On Jun 4, 4:34 pm, [EMAIL PROTECTED] (GMan) wrote: > I am trying to teach myself Perl Objects. > > I have a Person object with a name and a list of friends. > > Here is a test program that uses it. > > #! /usr/bin/perl > > use Person; > > $p = new Person; > > $p->setname("Gary"); > $p->addfriend("B

Re: Annoying HASH(0x...) in Output

2007-06-05 Thread [EMAIL PROTECTED]
On Jun 4, 4:34 pm, [EMAIL PROTECTED] (GMan) wrote: > I am trying to teach myself Perl Objects. > > I have a Person object with a name and a list of friends. > > Here is a test program that uses it. > > #! /usr/bin/perl > > use Person; > > $p = new Person; > > $p->setname("Gary"); > $p->addfriend("B

Re: Annoying HASH(0x...) in Output

2007-06-05 Thread [EMAIL PROTECTED]
GMan wrote: > I am trying to teach myself Perl Objects. > > I have a Person object with a name and a list of friends. > > Here is a test program that uses it. > > #! /usr/bin/perl > > use Person; > > $p = new Person; > > $p->setname("Gary"); > $p->addfriend("Bill"); > $p->addfriend("John"); > $p-

Re: Annoying HASH(0x...) in Output

2007-06-04 Thread Tom Phoenix
On 6/4/07, GMan <[EMAIL PROTECTED]> wrote: sub new { my ($class) = @_; my ($self) = { }; bless $self, $class; $self->{'_name'} = ""; @friends = { }; Wait, what was that? Where did this @friends variable come from? It should probably be a 'my' variable; if you have 'use stri

Annoying HASH(0x...) in Output

2007-06-04 Thread GMan
I am trying to teach myself Perl Objects. I have a Person object with a name and a list of friends. Here is a test program that uses it. #! /usr/bin/perl use Person; $p = new Person; $p->setname("Gary"); $p->addfriend("Bill"); $p->addfriend("John"); $p->print(); Here is the output from the t