# This does not work my @nums = m/([0-9]+)/g =~ $1 if $path =~ m/([^\/]+$)/;