sub ban { open( CFG, "<", "/etc/squid/squid.conf" ); my @cfg; # <-- while ( ) { push @cfg, $_; } ...