use Fcntl qw(F_GETFL O_APPEND); sub is_append { my $fh = shift; my $status = fcntl($fh, F_GETFL, 0); return $status & O_APPEND; }
In reply to Re: How do i determine which mode the file has open ? (write or append mode)
by salva
in thread How do i determine which mode the file has open ? (write or append mode)
by loga
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |