http://www.perlmonks.org?node_id=966579


in reply to Regex help needed

I wouldn't bother with a regexp. I'd use split (technically, that uses a regexp as well):
my ($first, $last, $id) = split '%'; print "$last $first\n" if substr($id, 0, 1) eq 'A';