cutter has asked for the wisdom of the Perl Monks concerning the following question:
Looking on comments to improve my Perl skills. I am revising a script that we use to validate Autosys JIL (Job Insertion Language) files before they are promoted to production. One of the rules is that if insert_job is in the record set then owner must be in the same record. insert_job and owner are on separate lines of the record.
What I have done in the past was if I found insert_job set a flag varable to 1 and if the owner value was found in the record, set the varable to 0. Then if flag eq 1 at the end of the record, raise a error.
Thinking now to put the record into a hash and if $hash{insert_job} exists, then $hash{owner} exists or raise error.
Any other sugesstions? Not looking for full blown solutions, just ideas. We keep adding tests to this script, so I want to make sure I do something that allows for flexability
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Testing if A is in a record, The B must be in the Record
by Limbic~Region (Chancellor) on Aug 03, 2006 at 17:01 UTC | |
by cutter (Acolyte) on Aug 03, 2006 at 17:35 UTC | |
by ikegami (Patriarch) on Aug 03, 2006 at 17:59 UTC | |
|
Re: Testing if A is in a record, The B must be in the Record
by GrandFather (Saint) on Aug 03, 2006 at 21:11 UTC |