Using $|=1 in real life, for squidGuard
In a previous minipost I mentioned Perl's $|=1 'autoflush output' option, which autoflushes all output. This is relevant in IPC more than in interactive scripts (these are USUALLY autoflushed, although any threaded program will show you differently).
In the Squid configuration at a local firewall where authpf is used, the system does not only filter connections per-user (which is authpf's job), but it also authenticates them to squid via authpf. The relevant configuration lines in /etc/squid/squid.conf are:
# next line needed to read the /var/authpf directory
external_acl_type check_authpf children=15 %SRC /usr/local/bin/authpf.pl
acl authpf external check_authpf
They tell Squid to get the IP's (%SRC) ...