its Unix, I'd use cron as its probably already running. And do something
like: script.pl $(find <path> -type f -print0) Every few seconds. Have the
script die if ARGV[0] is undefined. I don't remember what character
'-print0' puts between files -check the man pages and split on that. Loop
through the files, use the csv module to separate your input (or
'split("\t", ...) ) and use dbo and insert your stuff.
On Nov 7, 2010 7:17 PM, "Chap Harrison" <c...@pobox.com> wrote:
> Hi folks,
>
> I'm in the thinking stages of creating a table-load utility, which reads a
tab-separated CSV file and inserts or updates rows in a relational table
(probably Oracle). I don't think that will be too hard, having used Perl
DBI/DBD modules in the past. What's different is that customers will
transmit their files to a directory on a Linux server, using an FTP/SFTP
client of their choosing, after which my utility needs to "notice" the
arrival of the file, and initiate the table updating.
>
> Are there any Perl facilities, or modules, I should be considering for
this? Or is this sort of problem typically solved with something as
primitive as a daemon that periodically polls for changes to the
directories?
>
> And - is there perhaps a name for this kind of design? (I mean, other than
"somewhat retarded" ;-) Kind of like "store-and-forward", but different?
That would help my googling.
>
> I do appreciate any follow-up questions or suggestions....
>
> Chap
>
>
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>