Nice little trick, but I'm sure the first could be written as a pure perl script (I don't like the idea of launching an interpreter from an interpreter). Of course, I can't be bothered to... because I can't remember an easy way of doing a read and a write at (about) the same time.
*sigh*
----
Arrr, Jim lad.