On Aug 25, 6:09 am, [EMAIL PROTECTED] (Chas Owens) wrote:
> Ah, I knew there was a reason beyond readability that I preferred
> fetchrow_hashref:
>
> from perldoc DBI
>"fetchrow_arrayref"
>Note that the same array reference is returned for each fetch,
>"fetchrow_hashre
On 8/24/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
snip
> No, the version of DBI that I am using is very current so apparently
> the DBI book is current on that issue also. Using your code above
> (same as book) worked fine.
snip
Ah, I knew there was a reason beyond readability that I prefe
On Aug 24, 9:03 am, [EMAIL PROTECTED] (Paul Lalli) wrote:
snip
>
> 'our', like 'my', is lexically scoped. Its effects are terminated
> when the innermost enclosing block ends. So if you're using the same
> package variable in two different blocks, you have to use 'our' in
> each of them:
>
Yes
On Aug 24, 9:55 am, [EMAIL PROTECTED] (Mr. Shawn H. Corey) wrote:
> Paul Lalli wrote:
> > 'our', like 'my', is lexically scoped. Its effects are terminated
> > when the innermost enclosing block ends. So if you're using the same
> > package variable in two different blocks, you have to use 'our'
On Aug 24, 9:37 am, [EMAIL PROTECTED] (Chas Owens) wrote:
> On 8/24/07, Paul Lalli <[EMAIL PROTECTED]> wrote:
> snip> 'our', like 'my', is lexically scoped. Its effects are terminated
> > when the innermost enclosing block ends. So if you're using the same
> > package variable in two different bl
On 8/24/07, Mr. Shawn H. Corey <[EMAIL PROTECTED]> wrote:
> Paul Lalli wrote:
> > 'our', like 'my', is lexically scoped. Its effects are terminated
> > when the innermost enclosing block ends. So if you're using the same
> > package variable in two different blocks, you have to use 'our' in
> > e
Paul Lalli wrote:
'our', like 'my', is lexically scoped. Its effects are terminated
when the innermost enclosing block ends. So if you're using the same
package variable in two different blocks, you have to use 'our' in
each of them:
'our' is not lexically scoped; it is package scoped. Once
On 8/24/07, Paul Lalli <[EMAIL PROTECTED]> wrote:
snip
> 'our', like 'my', is lexically scoped. Its effects are terminated
> when the innermost enclosing block ends. So if you're using the same
> package variable in two different blocks, you have to use 'our' in
> each of them:
snip
> Your syntax
On Aug 23, 7:13 pm, [EMAIL PROTECTED] wrote:
> On Aug 18, 7:58 pm, [EMAIL PROTECTED] (Paul Lalli) wrote:
> I've learned more about references and also about scoping of variables
> - now I'm doing "use strict" and it took a while to make it work here.
> A side question: why is it necessary to declar
On Aug 18, 7:58 pm, [EMAIL PROTECTED] (Paul Lalli) wrote:
snip
>
> Is that seriously from the book? UGH. Just declare $array_ref in the
> proper scope, and there's no need to take a reference to a dereference
> of the reference.
>
> while (my $array_ref = $sth1->fetchrow_arrayref) {
> push
On Aug 18, 10:03 pm, [EMAIL PROTECTED] (Randal L. Schwartz) wrote:
> > "Paul" == Paul Lalli <[EMAIL PROTECTED]> writes:
> >> while ($array_ref = $sth1->fetchrow_arrayref) {
> >> push @stash, [ @$array_ref ]; ##copy array contents
>
> Paul> Is that seriously from the book? UGH. Just declare $
> "Paul" == Paul Lalli <[EMAIL PROTECTED]> writes:
>> while ($array_ref = $sth1->fetchrow_arrayref) {
>> push @stash, [ @$array_ref ]; ##copy array contents
Paul> Is that seriously from the book? UGH. Just declare $array_ref in the
Paul> proper scope, and there's no need to take a referenc
On Aug 17, 5:07 pm, [EMAIL PROTECTED] wrote:
> I'm reading the book Programming the Perl DBI to start work with
> databases. The DBI portion I'm getting OK, but I find the reference
> here to @$ confusing. (This code is based from the book.)
>
> my $sth1 = $dbh->prepare("select 'SCM_ORDERS_OUT', m
[EMAIL PROTECTED] wrote:
I'm reading the book Programming the Perl DBI to start work with
databases. The DBI portion I'm getting OK, but I find the reference
here to @$ confusing. (This code is based from the book.)
my $sth1 = $dbh->prepare("select 'SCM_ORDERS_OUT', message_index,
message_no, m
[EMAIL PROTECTED] wrote:
I'm reading the book Programming the Perl DBI to start work with
databases. The DBI portion I'm getting OK, but I find the reference
here to @$ confusing. (This code is based from the book.)
my $sth1 = $dbh->prepare("select 'SCM_ORDERS_OUT', message_index,
message_no, m
On 8/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I'm reading the book Programming the Perl DBI to start work with
> databases. The DBI portion I'm getting OK, but I find the reference
> here to @$ confusing. (This code is based from the book.)
snip
It is funny that you use the word refe
16 matches
Mail list logo