10 use constant DIR_AD => "/usr/local/squid/etc/ad";
13 chdir DIR_AD or die "chdir ".DIR_AD.": $!";
20 open(M4,"-|","m4 --prefix-builtins --synclines main") or die "m4 run: $!";
25 do { $files{$1}=undef; next; } if /^#\s*line\s+\d+\s+"(.*)"$/;
32 $patt=qr @^http://($patt).*\n$@;
34 while ($_=shift @got || <>) {
35 while (my($file,$old)=each %files) {
36 my $new=(stat $file)[9];
38 next if !defined $old || $old==$new;
42 s@$patt@http://localhost/cgi-bin/redirector-ad.cgi?$^R\n@;