$flags = fcntl( FH, F_GETFL, 0 ); $rc = fcntl( FH, F_SETFL, $flags ); #### $flags = fcntl( FH, F_GETFL, 0 ); print "current flags -> $flags\n"; ## now we've got trouble $rc = fcntl( FH, F_SETFL, $flags );