Hello,
I have problems in understanding $#{@$ use ?????
1- my $ref = $$temp_sth -> fetchall_arrayref({});
for(my $i=0; $i <= $#{@$ref}; $i++) {
push(@$temp_table,$ref->[$i]);}
Can some one explain the under given function.
2- sub buildSensorsHashtable
{
my ($dbh) = @_;
my $error = 0;
my $query = "SELECT * FROM Sensors";
my $sth = $dbh->prepare($query);
if(!$sth || !($sth->execute())) { $error = 1 ;
}
my $ref = $sth->fetchall_arrayref({});
my %s;
my @s = @$ref;
foreach (@s)
{
if($_->{"StatusID"} eq "1") { $s{$_->{"IP"}} = $_->{"SensorID"}; }
}
return (\%s,$error);
3- Which is the best tool for debuging perl programs having CGI support. I
used DDD but that does not support CGI.
Regards,
Raheel
Thread Next