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
In reply to Testing if A is in a record, The B must be in the Record by cutter
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |