Re: reference to an array

2005-08-08 Thread Binish A R
David Baird wrote: On 8/8/05, Binish A R <[EMAIL PROTECTED]> wrote: I am a bit confused whether this is possible or not? I would like to have an array reference, the command am using is something like : -- $sth = $dbh->prepare("SELECT * from tablename"); $sth->execute; $aref = $sth->fetch

Re: reference to an array

2005-08-08 Thread David Baird
On 8/8/05, Binish A R <[EMAIL PROTECTED]> wrote: > I am a bit confused whether this is possible or not? > I would like to have an array reference, the command am using is something > like : > > -- > $sth = $dbh->prepare("SELECT * from tablename"); > $sth->execute; > > $aref = $sth->fetchrow_arra

Re: Reference to an array from within a hash....how to de-ref.

2003-06-02 Thread Rob Anderson
> the life of me, I cannot get there. I have tried... > >foreach $key ( keys %$hostsref ) { >print ("Inserting $key into Database\n"); Try this, the prints are to make it easier to understand, hopefully :-) # print '$hostsref = ' . $hostsref . "\n";# your or

RE: Reference to an array from within a hash....how to de-ref.

2003-06-02 Thread Charles K. Clarkson
Hamish Whittal <[EMAIL PROTECTED]> wrote: : Now I want to get at the arrays inside the IP address : keysand for the life of me, I cannot get there. I : have tried... : : foreach $key ( keys %$hostsref ) { : print ("Inserting $key into Database\n"); : @arr = @{ $hostsref{$key} };

Re: reference to an array

2002-05-28 Thread Peter Scott
At 09:22 AM 5/28/02 -0400, William West wrote: > b) you might want to pass in a reference to the array - and fill it up > > push( @$array_ref, $_ ) > > >i almost understand this- not really though... I'm not sure what it was for either, missed the earlier part of the

Re: reference to an array

2002-05-28 Thread drieux
On Tuesday, May 28, 2002, at 06:22 , William West wrote: [..] > drieux wrote... > > b) you might want to pass in a reference to the array - and fill it up > > push( @$array_ref, $_ ) [..] > i almost understand this- not really though... I shall presume you got David's c

Re: reference to an array

2002-05-28 Thread David vd Geer Inhuur tbv IPlib
Hi Willy, What does push and what is $_ That will probably be your question. Here is one example : open(FH, "< $file"); while { ## is the File Handler we just openened with open ## We do something with ?? ## Yes, no var is set but instead we use $_ for the current line. ## Now we ca