in reply to system call: Unix system call result into a variable

You can also use the open function to run the command and create a filehandle for the pipe:
open($cmd, "tail -n 10 $ERRLOG |"); while(<$cmd>) { # do something here }
This may be more generic, if you want to do some more complicated processing of each line of output from the system call?