--Original Message-
From: James Edward Gray II [mailto:[EMAIL PROTECTED]
Sent: Saturday, November 22, 2003 8:18 AM
To: Rajesh Dorairajan
Cc: '[EMAIL PROTECTED]'
Subject: Re: dereferencing a list from a class
On Nov 21, 2003, at 3:19 PM, Rajesh Dorairajan wrote:
> I've
On Saturday, Nov 22, 2003, at 08:17 US/Pacific, James Edward Gray II
wrote:
On Nov 21, 2003, at 3:19 PM, Rajesh Dorairajan wrote:
I've a class (blessed, of course :)) that has variables like:
$self->a = "1";
$self->b = "2";
$self->c = [ '1', '2', '3', '4' ];
I think/hope you meant:
$self->{a}
Rajesh Dorairajan wrote:
> I've a class (blessed, of course :)) that has variables like:
>
> $self->a = "1";
> $self->b = "2";
> $self->c = [ '1', '2', '3', '4' ];
>
> Now, I want to write a foreach loop to iterate through $self->c and print
> the values. However:
>
> foreach my $foo ( $self->c )
On Nov 21, 2003, at 3:19 PM, Rajesh Dorairajan wrote:
I've a class (blessed, of course :)) that has variables like:
$self->a = "1";
$self->b = "2";
$self->c = [ '1', '2', '3', '4' ];
I think/hope you meant:
$self->{a} = '1';# any reason we're quoting integers?
$self->{b} = '2';
$self
message bounced. retrying
-Original Message-
From: Rajesh Dorairajan
Sent: Friday, November 21, 2003 1:19 PM
To: '[EMAIL PROTECTED]'
Subject: dereferencing a list from a class
I've a class (blessed, of course :)) that has variables like:
$self->a = "1";
$se
I've a class (blessed, of course :)) that has variables like:
$self->a = "1";
$self->b = "2";
$self->c = [ '1', '2', '3', '4' ];
Now, I want to write a foreach loop to iterate through $self->c and print
the values. However:
foreach my $foo ( $self->c ) {
print $foo;
}
gets me the whole