>>>>> "JG" == Jim Gibson <[email protected]> writes:
JG> On 5/4/10 Tue May 4, 2010 4:52 PM, "Paul Fontenot" <[email protected]> JG> scribbled: JG> You need to reset LOGFILE to the beginning for subsequent JG> iterations over the @conditions array. As written, the nested JG> foreach will never be executed except for the first condition. Add JG> the indicated seek call. or another (IMO better) solution is to change the order of the loops. loop over the log lines first, then check each line for the types in the inner loop. you can't directly print them then if you want to group them by type. all you need to do is push the lines onto an array or append them to a string with .= and then print them at the end of the program. this way you only scan the log file one time which is faster than scanning it twice. and log files can be very very long. uri -- Uri Guttman ------ [email protected] -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com --------- -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
