in reply to How would you shorten this regexp conditional?
my $color = $file =~ /^[^-]*princepawn.*?-/ ? 'w' : 'b'; [download]