in reply to 3D JAPH

Err, you might need a '$| = 1;' in there somewhere, otherwise the selects() are kind of pointless....