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, $_; } ...
In reply to Re^9: Real time log parser
by Eliya
in thread Real time log parser
by kazak
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |