$ perl -Mstrict -Mwarnings -de 1 Loading DB routines from perl5db.pl version 1.39_09 Editor support available. Enter h or 'h h' for help, or 'man perldebug' for more help. main::(-e:1): 1 DB<1> $_ = 'ActionLogs.1.1998.xml' DB<2> x /\.(\d+)/g 0 1 1 1998 DB<3> x /(\d+)\./g 0 1 1 1998 DB<4> $_ = 'ActionLogs.1.2.3.4.5.6.7.8.9.xml' DB<5> x /\.(\d+)/g 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 DB<6> x /(\d+)\./g 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 DB<7> q