The other changes you suggested do prevent the error from happening. If the illegal seek error isn't coming from the read then where is it coming from? What's setting $!?
I do see how the "or die" on the join could be a logic error on my part because it's going to be the value of the assignment that's checked, which if there's nothing in STDERR, would be empty, which would trigger the "or" condition.
Something still doesn't add up in my mind though.