You're assuming that BAZ mainframe wants to let me move data away. They don't, so the only way to do so is with ugly hacks. That's the bulk of programming: making things that don't want to interoperate interoperate.
If everything was a service, then everything would be easy, and our tools would look a lot different. But if you can't change the world, you can at least make living in an imperfect world easy, and that's what Perl tries to do.