RE: anyway to determine # rows before fetch loop ends and without seperate count(*)



Read standard books such as _Programming Perl_ by Wall etc. for information
on array references.

Generally references are the most efficient way to pass arrays around or
return them from a function. Returning an array instead of a reference to
an array means the whole array has to be copied. Array references avoid
that. An array reference is not a two-dimensional array.

selectall_arrayref() returns an array reference.

Maybe you still need to work on this issue, but it's off topic for this
list.

-Will


-----Original Message-----
From: listmail [mailto:listmail@xxxxxxxxxxxx]
Sent: Friday 18 November 2005 09:59
To: dbi-users@xxxxxxxx
Subject: Re: anyway to determine # rows before fetch loop ends and without
seperate count(*)


Well I'm not seeing why a number of arrays that each point to arrays
could not be consider a matrix of arrays when considering one definition
of the word matrix "Something resembling such an array, as in the
regular formation of elements into columns and rows". I dunno, i'm not
trying to argue with you of course. It is apparent that I truly am
confused with Perl References again. I beleive my main mistake could be
using "foreach my $record (@{ $results })" instead of what you've shown
"for my $record (@{ $results })". I'll test this later when I get a
chance and also see how I can include the use of bind variables while
using this method as well.

I appreciate your help an explanations.



- - - - - - - Appended by Scientific-Atlanta, Inc. - - - - - - -
This e-mail and any attachments may contain information which is confidential, proprietary, privileged or otherwise protected by law. The information is solely intended for the named addressee (or a person responsible for delivering it to the addressee). If you are not the intended recipient of this message, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete it from your computer.



Relevant Pages

  • Re: Sorting
    ... When trying to decipher a Schwartzian transform, ... We start with the array of @lines. ... and the second is the value we want to sort by eventually. ... The sort now takes this list of array references, ...
    (comp.lang.perl.misc)
  • Re: Comparing two CSV files
    ... array references. ... returns an array of array references. ... parsed line of the CSV file. ... which contains the parsed values of the first line of your first CSV ...
    (perl.beginners)
  • Re: Reading & Posting Usenet News Messages
    ... If you want to print out the array referenced by $bodytext, ... > Dereference and copy the entire array: ... I was looking for information on array references, ...
    (comp.lang.perl.misc)
  • Re: Using JOIN: Converting scalar to array
    ... Dear Benjamin, ... array of array references). ... character and one other scalar value, it isn't going to join anything. ...
    (comp.lang.perl.misc)
  • Re: Hash of arrays & values function
    ... Perl' was a breeze" but "'Programming Perl' is frequently making my head ... I need to store info about which hosts users are logged into & ... but you still need to dereference the array references. ... foreach { ...
    (comp.lang.perl.misc)