use strict; use warnings; use Test::More tests => 6; my $x = 111; my $y = '111'; my $z = "1\N{LATIN CAPITAL LETTER GAMMA}1"; ok !($x & ~$x), '$x is a number, &~'; ok $y & ~$y, '$y is a string, &~'; ok $z & ~$z, '$z is a string, &~'; ok !($x ^ $x), '$x is a number, ^'; ok $y ^ $y, '$y is a string, ^'; ok $z ^ $z, '$z is a string, ^'; #### $ perl isnum.t 1..6 ok 1 - $x is a number, &~ ok 2 - $y is a string, &~ Use of strings with code points over 0xFF as arguments to 1's complement (~) operator is deprecated. This will be a fatal error in Perl 5.28 at isnum.t line 12. Use of code point 0xFFFFFFFFFFFFFFCE is deprecated; the permissible max is 0x7FFFFFFFFFFFFFFF. This will be fatal in Perl 5.28 at isnum.t line 12. Use of code point 0xFFFFFFFFFFFFFE6B is deprecated; the permissible max is 0x7FFFFFFFFFFFFFFF. This will be fatal in Perl 5.28 at isnum.t line 12. Use of code point 0xFFFFFFFFFFFFFFCE is deprecated; the permissible max is 0x7FFFFFFFFFFFFFFF. This will be fatal in Perl 5.28 at isnum.t line 12. Use of code point 0xFFFFFFFFFFFFFFCE is deprecated; the permissible max is 0x7FFFFFFFFFFFFFFF. This will be fatal in Perl 5.28 in bitwise and (&) at isnum.t line 12. Use of strings with code points over 0xFF as arguments to bitwise and (&) operator is deprecated. This will be a fatal error in Perl 5.28 at isnum.t line 12. Use of code point 0xFFFFFFFFFFFFFE6B is deprecated; the permissible max is 0x7FFFFFFFFFFFFFFF. This will be fatal in Perl 5.28 in bitwise and (&) at isnum.t line 12. Use of code point 0xFFFFFFFFFFFFFFCE is deprecated; the permissible max is 0x7FFFFFFFFFFFFFFF. This will be fatal in Perl 5.28 in bitwise and (&) at isnum.t line 12. ok 3 - $z is a string, &~ ok 4 - $x is a number, ^ ok 5 - $y is a string, ^ Use of strings with code points over 0xFF as arguments to bitwise xor (^) operator is deprecated. This will be a fatal error in Perl 5.28 at isnum.t line 16. ok 6 - $z is a string, ^ #### $ perl isnum.t 1..6 ok 1 - $x is a number, &~ ok 2 - $y is a string, &~ Use of strings with code points over 0xFF as arguments to 1's complement (~) operator is not allowed at isnum.t line 12. # Looks like your test exited with 255 just after 2.