in reply to How do i determine which mode the file has open ? (write or append mode)

use FileHandle::Fmode qw(:all); #$fh and FH are open filehandles print is_R($fh), "\n"; #it return true if file open in read mode print is_W(\*FH), "\n";#it return true if file open in write mode
  • Comment on Re: How do i determine which mode the file has open ? (write or append mode)
  • Download Code