Hmmm ... well you could try Fcntl; however, it may not be supported on your platform:
!#/usr/bin/perl use Fcntl; open( FH, "<", "/bin/cat" ) or die "cannot open file: $!\n"; $flags = fcntl(FH, F_GETFL, 0) or die "Can't get flags for the file: $ +!\n"; if( $flags | O_BINARY ) { print "OPEN FOR BINARY\n" }
In reply to Re: Has a filehandle been binmode'd
by derby
in thread Has a filehandle been binmode'd
by fireartist
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |