in reply to Getting characters from regex pattern

How about this (dispatch subroutines):
my $r = q/Capri|Classic/; my $d= {capri => sub {print $_[0]}, somethingelse => sub { print 'handler for something else'} }; $r=~m/($_)/i and $d->{$_}->($1) for keys %$d ; #-- prints "Capri"

     Have you been high today? I see the nuns are gay! My brother yelled to me...I love you inside Ed - Benny Lava, by Buffalax