I recently figured out how to type unicode in Emacs so I thought it'd be fun to write some functions with unicode names. Nope. It didn't work. I recalled [5.8.0 Note] A Sub Named Sigma but the same magic doesn't work here. Am I doing this wrong or is this a bug in my perl? I tried both 5.8.8 and bleadperl.
use utf8;
use strict;
use warnings;
use Test::More tests => 2;
sub ∃ (&\@) { my $cb = shift @_; $cb->() and return 1 for @_; 0 }
sub ∄ (&\@) { not ∃( @_ ) }
my @numbers = 1 .. 10;
ok( ∃ { /\d/ } @numbers, '∃' );
ok( ∄ { /[[:alpha:]]/ } @numbers, '∄' );
1..2 Illegal declaration of anonymous subroutine at /home/josh/src/any.pl l +ine 6. # Looks like your test died before it could output anything.
⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊
In reply to A sub named ∃ by diotalevi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |