in reply to $io->autoflush - which perl version?

It will work in 5.10 too if you add use IO::Handle