I replaced the my if-else loops with these.
my @del_user_error_count; foreach my $i (0..4) { if ($cdr_post_array[11] eq $del_user_errors[$i]) { $del_user_error_count[$i]++; last; } }
Its decreased 42 lines but its increasing the execution time. I see this through benchmark.
For if-else loop it gives
the code took:52 wallclock secsAfter replacing the code with foreach
the code took:67 wallclock secsIn reply to Re^2: Making program readable
by ravi45722
in thread Making program readable
by ravi45722
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |