in reply to Waiting forever?

In default conditions, this will wait until it has collected one line of input (i.e. everything up to $/, the input record separator) before returning control to the program. To avoid this behaviour, have a look at select (the four argument version) to poll file descriptors to see whether or not they have input waiting to be read, and have a look at perlfaq8 which has an item on nonblocking IO. This last is also a good search string to find information on avoiding blocking on reads.

Good luck!

CU
Robartes-