#!/usr/bin/perl -CAO
							 | 
						|
								
							 | 
						|
								# via @chneukirchen
							 | 
						|
								# uni PATTERN - list unicode symbols matching PATTERN
							 | 
						|
								
							 | 
						|
								BEGIN { $SIG{'__WARN__'} = sub { } };   # silence next load
							 | 
						|
								use Unicode::CharName;
							 | 
						|
								
							 | 
						|
								my $rx = shift || die "Usage: uni PATTERN\n";
							 | 
						|
								m/$rx/;  # fail early on faulty regexps
							 | 
						|
								
							 | 
						|
								while (<Unicode::CharName::DATA>) {
							 | 
						|
								    my ($hex, $desc) = split(/ /, $_, 2);
							 | 
						|
								    $char = pack("U", hex($hex));
							 | 
						|
								    if ($desc =~ /$rx/i || $char eq $rx || lc($hex) eq lc($rx)) {
							 | 
						|
								        print "$char\t$hex\t$desc";
							 | 
						|
								    }
							 | 
						|
								}
							 |