Hi,
I have a DBF file and like to access it. I already write a script and got an error message, "
"Can't use string ("01010005") as an ARRAY ref while "strict refs" in use at migr asi2.pl line 19.
and my script is:
use strict;
use DBI;
my ( $CUST, $NAMA, $AL, $AL2, $TLP, $PERSO, $NPWP, $TERM, $LIMIT, $PKP, $WIL, $KLINK, $KODE_CABANG, $AL3, $SLM, $VLT, $KDHARGA, $AL_KIRIM1, $AL_KIRIM2, $AL_KIRIM3, $DISC_NOTA, $NDISC_NOTA, $DISC_FILT, $IKUTPROGSB ) = "";
my $dbh = DBI->connect("DBI:XBase:c:\/temp") or die $DBI::errstr;
my $sth = $dbh->prepare("select * from customer") or die $dbh->errstr();
$sth->execute();
my $ref = $sth->fetchrow_arrayref();
foreach my $row (@$ref) {
my ( $CUST, $NAMA, $AL, $AL2, $TLP, $PERSO, $NPWP, $TERM, $LIMIT, $PKP, $WIL, $KLIN!
K,
$KODE_CABANG, $AL3, $SLM, $VLT, $KDHARGA, $AL_KIRIM1, $AL_KIRIM2, $AL_KIRIM3, $DISC_NOTA, $NDISC_NOTA, $DISC_FILT, $IKUTPROGSB ) = @$row; }
$dbh->disconnect();
do you mind anyone can tell me what the error means and how I can fix it?
What I would like to do is access the DBF file and print each field to the a HTML page.
I am looking forward to a favorable reply from you. Thank you.
Regards,
Eko Budiharto
Yahoo! Mail
Bring photos to life! New PhotoMail makes sharing a breeze.
_______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
