Re: scalar vs. vector context

2001-05-07 Thread Brett W. McCoy
On Mon, 7 May 2001, Lonya Julin wrote: >@possWords = push(@possWords,$temp) ; Err... this is your problem. You are pushing your value onto @possWords, then returning the number of elements into the same array. I don't think this is what you want. push returns a $calar value with the new

Re: scalar vs. vector context

2001-05-07 Thread Timothy Kimball
:@possWords = push(@possWords,$temp) ; This line is the problem. push() returns the number of elements in the array after the new elements have been pushed onto it. Get rid of the "@possWords = " part of this line. -- tdk

scalar vs. vector context

2001-05-07 Thread Lonya Julin
Hi there, I could use some help with printing array/list contents, rather than length. In the class I'm taking, we learned that if you print it within a C-string, the contents will print, but if it's in scalar context (ie. $a = @a ; print $a) then you'll get the length of the list. In my script,