J
Jie
Hi,
I have a folder where new files will be generated when some other
programs finished working.
Now, I need to write a perl program to store some text output files
generated from the other programs into a MySQL database. i think that
i could just write a perl code to generate a sql command file and
insert text into database.
The challenge is that this perl program needs to know what files have
already been processed, while only process on NEW files.. Maybe in
the mysql database, i could create a field to record the time of the
last run, then compare that time with the timestamp of all files to
find what files are new and therefore needs to be processed. if this
is the way to go, can you please let me know how to get the timestamp
of files? Also, to retrieve the time recorded in mySQL, the idea in my
mind now is to use something like below. There might be a better way,
i believe...
the_times = `mysql -u me - p the_password; select last_time from
dummp_table`
Thanks!!
Jie
I have a folder where new files will be generated when some other
programs finished working.
Now, I need to write a perl program to store some text output files
generated from the other programs into a MySQL database. i think that
i could just write a perl code to generate a sql command file and
insert text into database.
The challenge is that this perl program needs to know what files have
already been processed, while only process on NEW files.. Maybe in
the mysql database, i could create a field to record the time of the
last run, then compare that time with the timestamp of all files to
find what files are new and therefore needs to be processed. if this
is the way to go, can you please let me know how to get the timestamp
of files? Also, to retrieve the time recorded in mySQL, the idea in my
mind now is to use something like below. There might be a better way,
i believe...
the_times = `mysql -u me - p the_password; select last_time from
dummp_table`
Thanks!!
Jie