I have a project coming up that has a rather short development cycle and a rather strict deadline. Most of the Perl scripts I've written manipulate ascii data from flat files and produce flat files or some sort of report. This new project is a bit different. I need to write a front end to a control file that is used by a couple of other processes. The idea is that a user would need to add, edit, and list(search) records from this control file. The file is made up of less than 1000 records that are : delimited. The records contain 21 fields and the combination of 2 of the fields(13 and 21) make a record unique. My plan is to open the file and add it to a hash that has the key(fields 13, 21) and the whole record as the value. Something like:
<psuedo-code>
#!/usr/bin/perl -w
use strict;
open(FH, "<control.txt") or die "yada... $!";
while (<FH>) {
my $key = join "", (split/:/)[13,21];
%recs = ($key => $_);
}
</psuedo-code>
This should give me an easy way to search for records.
This app will be run by a several users on widows terminal(reflection) software connected to our HP-UX server. I don't need record level locking, so I think an ascii flat file approach is best. If anyone can give me some suggestions regarding this project, particularly with respect to user interface or how you might go about handleing the records I'd appreciate it.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.