RE: Compare to a list



Dan Litsky wrote:
> I have a group of files that are sent to me every month and I'd like
> to write a quick Perl script to check to make sure that all of the
> fields are coming in. I wrote a Perl script to dump out all the
> field names (it dumps out all the headers which are the field names)
> and I've made sure it's complete. Now I want to run through the new
> files coming in, match the headers in those files to my list and
> print any fields that are in the list but not in the files cominng
> in. The list has two fields in it -- the name of the file in field1
> and the names of the fields in field2. I'm looking for some help in
> just a general, what is the best way to approach this type of thing.
> I can put the complete list of fields in Excel and read from that or
> I guess I can read the list into a Perl array but then I need to go
> through all of the files, match to the filename in the list and then
> look for the fields in each file.
Use the filname portion ( or whatever is necessary to make unique ) and place in a hash along with column information. I have done this for use in comparing one system(ie, Production against QA ) for DB2 for Tables and Indexes. I place the column infomation as anonymous arraysusing the column number as my index into the array. I use the index 0 for a count of the columns.

Wags ;)
>
> Dan
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com



*******************************************************
This message contains information that is confidential
and proprietary to FedEx Freight or its affiliates.
It is intended only for the recipient named and for
the express purpose(s) described therein.
Any other use is prohibited.
*******************************************************

.



Relevant Pages

  • [HPADM] Utility to copy a file periodically.
    ... do an Application Upgrade, against our wishes. ... or perl script to do this job. ... Do You Yahoo!? ... Mail has the best spam protection around ...
    (HP-UX-Admin)
  • regular expression
    ... regular expressions. ... I inherited a Perl script, and I'm trying to figure out what a specific line does. ... Do You Yahoo!? ... Mail has the best spam protection around ...
    (perl.beginners)
  • ftp in ascii mode
    ... I was trying to put some files to a remote machine from the local machine using a perl script in ascii mode. ... Do You Yahoo!? ... Mail has the best spam protection around ...
    (perl.beginners)
  • FILEHANDLE question on AIX machine
    ... I have to maintain a perl script, and encounter the ... Do You Yahoo!? ... Mail has the best spam protection around ...
    (perl.beginners)
  • RE: How to hide a file ?
    ... >> Just a quick note on hiding using data streams... ... >> creating an alternate data ... > put a Perl script up on my site that shows ... > Send FREE video emails in Yahoo! ...
    (Vuln-Dev)