Inventor wrote:
I agree, its just what I happened to create - what would you suggest,
and what would be the syntax for that?
The internal structures of your program should reflect the input, or the
output, or some well-defined internal structure. And by well-defined, I
mean a convention ever
On Jul 13, 12:54 pm, [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote:
>
> There's nothing wrong with using shorthand descriptions provided you
> don't forget what they are short for. It seems to me that your
> problems arise from using shorthand descriptions then basing your
> expectations on a literal
On Jul 13, 12:03 pm, [EMAIL PROTECTED] (Inventor) wrote:
> Thanks for helping with my question the other day, now I have
> another. In my class I have an array of hashes
In Perl, when we say "array of hashes" we are using it as shorthand
for "array of references to hashes".
99% of the time ever
"Chas Owens" schreef:
> [put an array @teams into the 0th element of $self]
> The proper syntax is
> $self->[0]{teams} = [ @teams ];
That makes a copy. If you don't want that, for example because it could
contain millions of items, you can use
$self->[0]{teams} = [EMAIL PROTECTED];
--
Inventor wrote:
Hi,
Thanks for helping with my question the other day, now I have
another. In my class I have an array of hashes and it seems to work
just fine. I use the zeroth element to store individual variables and
all the other elements to store variables that change over time. For
exam
On 7/13/07, Inventor <[EMAIL PROTECTED]> wrote:
snip
$self->[0]{'teams'} = @teams;
and
@self->[0]{'teams'} = @teams;
but when I try to access the array with
foreach $team ($self->[0]{'teams'}) {
print $team.' ';
}
or
foreach $team (@self->[0]('teams')) {
print $team.' ':
}
i get no