no utf8; # needed for use utf8 not griping about the raw octets
-require "./test.pl";
+BEGIN { require "./test.pl"; }
plan(tests => 55);
is( $x, chr(300).chr(130), sprintf('(%vd)', $x) );
open F, ">", "a" or die $!;
- if (${^OPEN} =~ /:utf8/) {
- binmode(F, ":bytes:");
- }
+ binmode(F, ":bytes:");
# Now let's make it suffer.
my $w;
print F chr(0x100);
close(F);
- isnt( defined $@ );
+ isnt( defined $@, !0 );
undef $@;
open F, ">a";
print F chr(0x100);
close(F);
- isnt( defined $@ );
+ isnt( defined $@, !0 );
no warnings 'utf8';
print F chr(0x100);
close(F);
- isnt( defined $@ );
+ isnt( defined $@, !0 );
use warnings 'utf8';