As others have said, you've left out some important information. What form is the data in when you start to work with it? When your script does what it needs to do, what is the nature of the output it should be producing?
Depending on what the task really is, it might be best to do some sort of preconditioning on all the input data, so that the decision criteria can be applied more efficiently -- e.g. instead of two arrays containing sequences of letters, how about a single list of strings, two characters per string (first character comes from one array, second character comes from the other array); skip the line if it contains an "x", do one thing if the two characters are the same, something else otherwise, etc etc.
But without more information, there's no point speculating about 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.