[CentOS] CentOS 5 file system read only issue

Wed Aug 21 14:20:46 UTC 2019
Warren Young <warren at etr-usa.com>

On Aug 21, 2019, at 7:35 AM, Xinhuan Zheng <xzheng at christianbook.com> wrote:
> my $s = IO::Select->new( $fh );
> if ( $io->can_write( 10 ) {

That’s not designed to do what you hope.  select(2) is a system call intended for use on network socket handles, not file handles.  Since socket handles and file handles are compatible on a Unix type system (including CentOS) the call doesn’t fail, but it *cannot* report the information you’re hoping to get.

I would first try calling the -w operator:

   print_to_file() if -w $fh;