Perl Regex Group Name

(?P<NAME>pattern)
(?<NAME>pattern)

  $variable =~ /(?<count>\d+)/;
  print "Count is $+{count}";

 

ref: http://stackoverflow.com/a/288989