De link :
Squid doesn't know how to run external helpers based on scripts, like .bat, .cmd, .vbs, .pl, etc. So in squid.conf the interpreter path must be always specified, for example:
url_rewrite_program c:/perl/bin/perl.exe c:/squid/libexec/redir.pl