Are you doing SSL re-encryption on F5(in other words, are you decrypting and then re-encrypting back to CAS)? If so, this method will definitely be slower than going directly to CAS because of the extra workload. If you deployed Exchange using F5-provided iApp/Deployment Guide, then I am certain this is a big contributing factor to the delay you are seeing.
Additionally, F5 iApp by default setups most optimal TCP settings for WAN-based connections. Tuning TCP is a tricky thing, and settings optimized for WAN-performance hurt LAN-based access, and vice versa. Sounds like you are also testing on a LAN and WAN-focused TCP tuning is contributing to the numbers you are seeing. If you want to see the difference, switch out the TCP profile on the Exchange virtual server to the lan-optimized one, and your perl tests should show better results.