in reply to capture value from two patterns
my ($id) = grep defined, (m!/key/(\d+)|/(\d+)-\d+!); [download]