Hi Everyone:
DBF files have this column that is "marked for
deletion". There is an X in the first column if it is
marked for deletion. I really need a way to identify
this "marked for deletion" column. Appreciate any
idea on how to identify this column. I am using the
following method to read .dbf files:
use Xbase;
$database = new Xbase;
$database->open_dbf("$upload_file_path_name$filename");
$database->go_top;
open(STDOUT, ">dbf_fields.txt");
$database->dbf_stat;
close(STDOUT);
open(VARS, "dbf_fields.txt");
@vars = <VARS>;
close(VARS);
foreach $temp (@vars)
{
$temp =~ s/[\n]$//;
$temp =~ s/[\s]+/\t/g;
@temp = split(/\t/, $temp);
$varlist .= "@temp[2]\t";
}
chop($varlist);
@varnames = split(/\t/, $varlist);
while (!($database->eof))
{
@temp = $database->get_record;
$varcount = 0;
while ($varcount < @varnames)
{
[EMAIL PROTECTED] = @temp[($varcount
- 1)];
$varcount++;
}
$database->go_next;
$count++;
}
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs