Errors and warnings (in UNIX, I don't know how this works in Windows) are printed to STDERR (standard error). STDERR is attached to the console by default, so if you want to print errors/warnings somewhere else, you just have to redirect STDERR (filehandle 2):
$ perl -Mstrict -e '$test = "foo"'
will print
Global symbol "$test" requires explicit package name at -e line 1.
Execution of -e aborted due to compilation errors.
to the console, but
$ perl -Mstrict -e '$test = "foo"' 2> error.log
will print the error to file ./error.log. Check your shell's manpage for details on redirecting STDERR.
hope this helps,
Update: as for using syslog to log the errors, I don't know if you can do this, since as far as I can remember, you use a specific system call to do that: syslog(3).
Update #2: a quick question in #debian @ freenode.net and I have something else: check the logger command, which is a "shell command interface to the syslog(3) system log module" (from the manpage).