in reply to Re^8: Real time log parser
in thread Real time log parser
You need to clear @cfg before pushing items onto it (i.e., simply use a lexical variable):
sub ban { open( CFG, "<", "/etc/squid/squid.conf" ); my @cfg; # <-- while ( <CFG> ) { push @cfg, $_; } ...
|
|---|