- or download this
use strict;
use warnings;
...
say $fh-> can( "print" ) ? "yes" : "no"; # yes
say "no" unless blessed $fh; # no
- or download this
use strict;
use warnings;
...
say $fh-> can( "print" ) ? "yes" : "no"; # no
autoflush $fh 1;
say $fh-> can( "print" ) ? "yes" : "no"; # yes
- or download this
$ perl -MO=Deparse -e '
> open my $fh, "+>", undef;
...
print $fh 123;
$fh->print(123);
-e syntax OK
- or download this
use strict;
use warnings;
...
say $foo-> can( "print" ) ? "yes" : "no"; # yes
say $bar-> can( "print" ) ? "yes" : "no"; # yes
}
- or download this
use strict;
use warnings;
...
__END__
GLOB(0x1ea3a0) is missing the 'print' method
- or download this
Use of uninitialized value $list in concatenation (.) or string at C:/
+berrybrew/5.26.0_64_PDL/perl/vendor/lib/Specio/Constraint/Role/CanTyp
+e.pm line 58.
GLOB(0x2d6a3a0) is missing the methods
- or download this
An unblessed reference (GLOB(0x560dc7cc1348)) will never pass an AnyCa
+n check (wants print)
- or download this
my $fh = IO::File-> new( 'some.log', 'w' );