my $pat = {qw(a - b = c ~ d ^)}->{substr($0, 0, 1)};