fiddler42 has asked for the wisdom of the Perl Monks concerning the following question:
Any suggestions on the *fastest* way to meet my 3 criteria above? (The keys to match are $aststartend and $ptstartend. Once a match is made, write $astpd, $ptpd, $astslack, and $ptslack to a file...)%astpd = (); %astslack = (); $ln = 0; while ($in1s[$ln] ne "") { chop ($in1s[$ln]); @in1saa = split(/\s+/,$in1s[$ln]); $aststartend = join (" ",$in1saa[0],$in1saa[1]); $astpd{$aststartend} = $in1saa[2]; $astslack{$aststartend} = $in1saa[3]; undef (@in1saa); $ln++; } %ptpd = (); %ptslack = (); $ln = 0; while ($in2s[$ln] ne "") { chop ($in2s[$ln]); @in2saa = split(/\s+/,$in2s[$ln]); $ptstartend = join (" ",$in2saa[0],$in2saa[1]); $ptpd{$ptstartend} = $in2saa[2]; $ptslack{$ptstartend} = $in2saa[3]; undef (@in2saa); $ln++; }
update (broquaint): added <code> tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Hash table question
by hardburn (Abbot) on Jun 24, 2003 at 16:24 UTC | |
by merlyn (Sage) on Jun 24, 2003 at 16:58 UTC | |
by halley (Prior) on Jun 24, 2003 at 16:58 UTC | |
by merlyn (Sage) on Jun 24, 2003 at 17:01 UTC |