my $title="$dbrow{'Title'}"; $title =~ m/([a-z])/i; # Match the first letter in $title if (lc($1) eq lc($layer)) { #do something... }