Hello Tara, and welcome to the Monastery!
One obvious slow-down is the shell-out call to system grep:
$final_data = ` grep "$key_pattern" "${indir}/${lkp_file_name}" |cut - +d"|" -f"$data_location"`;
which is expensive in itself and rendered especially so by being nested inside three loops. Try replacing it with a call to Perl’s inbuilt grep and see if that produces a significant speedup.
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
In reply to Re: Perl Script performance issue
by Athanasius
in thread Perl Script performance issue
by Tara
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |