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
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
> 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
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} };
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
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
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