use strict; use warnings; use feature qw/ say /; use Scalar::Util qw/ blessed/; open my $fh, ">", undef; say blessed( *$fh{ IO }); # IO::File say *$fh{ IO }-> can( "print" ) ? "yes" : "no"; # no autoflush $fh 1; say *$fh{ IO }-> can( "print" ) ? "yes" : "no"; # yes