$element =~ s/\s+$//g;
$return->{$keys->{$i}}=$element;
}
return $return;
}
#------------------------------------------------
sub readtxtfile
{
my $just = $_[0].".lock";
while(-f $just)
{select(undef,undef,undef,0.1);}
open(LOCKFILE,">$just");
open(READTXTFILE,"$_[0]");
my @readtxtfile=
close(READTXTFILE);
close(LOCKFILE);
unlink($just);
return @readtxtfile;
}
#------------------------------------------------
sub writetxtfile
{
my $just = $_[0].".lock";
while(-f $just)
{select(undef,undef,undef,0.1);}
open(LOCKFILE,">$just");
if ($_[2] == 1)
{open (WRITETXTFILE,">$_[0]");}
else{open (WRITETXTFILE,">>$_[0]");}
print WRITETXTFILE $_[1];
close(WRITETXTFILE);
close(LOCKFILE);
unlink($just);
return(1);
}
#------------------------------------------------
sub notify
{
use CGI;
my $query = new CGI;
print $query->header() if ($_[1] == 1);
print $_[0];
exit;
}
#------------------------------------------------
1;
__END__
=head1 NAME
JTDB -- A modules of control a txt-database width SQL-words
=head1 SYNOPSIS
use lib "."; # If NT,use lib "path-to-jtdb_directory";
use JTDB "1.01";
$main::split = ","; # Notice!, It's necessary! must be $main::split,






