A reference "\$err" is passed to rmpath rather than return the errors. When rmpath returns, the local $err reference either points to an empty list if there are no errors, or a list of file/message hash references. The reference $err is dereferenced as "@$err" (an array). The file/message hash references in the array are defererenced as "%$diag" and the each function converts it into a two element list.