Thomas Bätzler wrote:
> Ed <[EMAIL PROTECTED]> asked:
>>
>>          push( @lineArray,  @_  );  <---no it's an array of arrays.
> 
> This will append all the items in @_ to @lineArray.
> 
> You shoul've said "push( @lineArray,  [EMAIL PROTECTED]  );" instead.

No he shouldn't have.  @_ is a global variable so you are pushing a reference
to the same array every time which means that every element of @lineArray will
contain the last line read.  You need to either use a lexical variable or an
anonymous array.


John
-- 
use Perl;
program
fulfillment

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


Reply via email to