# Does FILE1 have data waiting? if (vec($read, fileno(FILE1), 1)) { # ... do stuff ... }