R
Rahul!!
Please take a look at this code snippet,
my $query = "SELECT itemid from items";
my $sh = $dz_dbh->prepare( $query );
$sh->execute || return( $dz_dbh->errstr );
while(my @row=$sh->fetchrow()) {
push (@item_id_arr,$row[0]);
}
foreach my $itemid (@item_id_arr){
print $itemid;
#statement 1
my $string="http://mymachine/mywebsite/show_item.cgi?id=$itemid";
#statement 2
my $content = get($string) || print "Unable to get page for $itemid
\n";
}
Strangely all itemids are displayed on the console as 111111111. If I
comment statement 1 and statement 2 itemids are displayed
correctly .Strangely something is wrong in this loop. Is it because of
the get() function called. Looks really weird ...
Can somebody help on this,
Thanks,
-Rahul
my $query = "SELECT itemid from items";
my $sh = $dz_dbh->prepare( $query );
$sh->execute || return( $dz_dbh->errstr );
while(my @row=$sh->fetchrow()) {
push (@item_id_arr,$row[0]);
}
foreach my $itemid (@item_id_arr){
print $itemid;
#statement 1
my $string="http://mymachine/mywebsite/show_item.cgi?id=$itemid";
#statement 2
my $content = get($string) || print "Unable to get page for $itemid
\n";
}
Strangely all itemids are displayed on the console as 111111111. If I
comment statement 1 and statement 2 itemids are displayed
correctly .Strangely something is wrong in this loop. Is it because of
the get() function called. Looks really weird ...
Can somebody help on this,
Thanks,
-Rahul