Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Yes... sort of.

by Bismark (Scribe)
on Jan 10, 2003 at 18:59 UTC ( [id://225914]=note: print w/replies, xml ) Need Help??


in reply to Yes... sort of.
in thread Can Perl create its own searchable db?

So if I am understanding your answer, this method would create a text file that would be appended everytime the form is submitted. Then if say the first time it is submitted I have report #100, then it is submitted again so now I have report #101. These would be in a delimited text file. Now I want to search the reports so that I can see report number 101. So I would want to load just that one section of the text doc. Or can I create a seperate text doc each time the form is submitted and then just load that one file back into the program. It seems to me that I could maybe set the text filename as a variable and then fill it with the report number which the program generates each time a new report is filed. The purpose of this form is to replace a paper version that we now use when ever we perform a first article inspection on a new product. That is the reason for the large size of the form.

Replies are listed 'Best First'.
Ah! More information now. :)
by khudgins (Sexton) on Jan 10, 2003 at 21:19 UTC
    Yes, you can get a timestamp in UNIX time format by calling time(). It'll give you an integer value of seconds since Jan 1, 1970, so you can be fairly sure that you'll get a unique value. So when you call your open( FILEHANDLE, "filename.txt"); you can first say:
    $filename = "prefix-" . time() . ".txt"; open( FILEHANDLE, $filename );
    The only problem you're going to have is when you need to compare reports. It's going to be a beast to write a comparison program to read all these files and give you relevant data. If you never need to do that, then separate files would probably be the ideal solution for you. If you *do* need comparison ability, then a real database is probably the best idea. If so, I'd either install a database server (MySQL is free and can be installed on most any platform. Postgres SQL is considered by many to be superior, and even more free. I *know* it runs on Linux and the BSDs, but I'm not sure what other platforms it's been ported to... good oods on any *NIX)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://225914]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-19 15:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found