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


in reply to Sort on Number Embedded in String

Possible typo or cut'n'paste error in the snippet (or, some transformation not mentioned), but as shown, the initial match,
$_ =~ /fwlogsum\.(\d+)\w+/;
does not match on anything in the data.

try:
$_ =~ /fwlog\.(\d+)\w+/;
instead... and then note that (unless you can guarantee that the data will never contain more than one month) this node is not helpful in the sense of providing a safe approach for production use.

There are MANY good suggestions re parsing dates above.