The hash was not suggested because of efficiency. I suggested a hash because they require less coding and make your life so much easier. Less coding, less room for errors, nicer code, etc. Not to mention that filling a hash from a textfile is trivial, so you can move the associations into a file.
open FILE, "< $assocFile"; foreach (<FILE>) { /^([^|]+)|(.*)$/; # Find beginning of line until a pipe (arbitrary marker) and pipe until end of line $assocHash{$1} = $2; } close FILE; I think the loop can be done in one less line, but who cares... On 4/18/07, Johnson, Reginald (GTI) <[EMAIL PROTECTED]> wrote:
Yes, that solves my problem. I could've looked at the hold day and would not have caught it. I guess a hash would be more efficient, but since that's not an issue for me at this time I'll stick with what I got. Thanks!
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/