On May 29, 4:58 am, [EMAIL PROTECTED] (Brian) wrote:
> On May 28, 6:14 pm, [EMAIL PROTECTED] (Paul Lalli) wrote:
>
>
>
> > >  oh yes, more important than all that minutiae... the push did not
> > > work for me in the working code.
>
> > The push worked absolutely fine.  It just didn't do what you wanted it
> > to.  Learning how to parse your problem should be your first step
> > toward becoming a better programmer.
>
>  hmmm, misunderstanding there. The push worked fine in the sample I
> posted, but not in the more complex working program I had simplified
> as an example.

nope, sorry, you're wrong.  push() works perfectly well.  It adds
elements to an array.  If your program produced incorrect results, it
is because you did something wrong, not because "push didn't work." Of
course, as you haven't shown any code that produces these undesired
results, we can only guess as to what your actual problem was.

> > > The array was being rewritten.
> > Then you didn't delcare your variables in the correct scope.
> understandable misperception on your part, as above

Nope.  If your array is being used in a loop, the contents of that
array are changing when you don't want them to be changing, and
instead want to be creating new arrays, you declared your array in the
wrong scope.

> > > I had to use an array copy
>
> > >   push @tRespsA, [ @r1 ];   ## copy contents to an anonymous array,
> > > push array ref
>
> > Do you understand *why* that was necessary?  Do you understand the
> > difference between these two pieces of code?
>
>   actually, I do indeed. In C++, the concept of a deep copy, vs
> shallow copy vs ref
> comes up all the time. I am just learning the syntax here, not
> programming itself

perhaps you should be. . .

>   aha, a force to be reckoned with. Your point above about the docs is
> quite true.
> I dont have time to rewrite docs right now.. They do need work though

You don't even have time to point out what you find to be "wrong" with
them?  But instead you do have time to create examples that you claim
to be in the service of newbies, all the while saying that the docs
are bad?  I'd suggest you could do with attending a few more time-
management seminars.

> This is sometimes appearing to be contentious

No sometimes about it.  Every post you've made thus far is
contentious, and so I have answered in kind.

Paul Lalli


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to