I have a text file that looks like:
/path/to/one/library /path/to/another /path/to/another/01 /path/to/another/s /path/to/another/02 /path/to/another/w1 /path/to/another/03 /path/to/another/1e /path/to/another/2014
I need to get the LAST directory(whose last name is numeric) 01;02;03;2014
($b) = $line =~ m#([^/]+)$#; ($c) = $line =~ m#(\d+)$#; if ($b eq $c){print "Match \n";}
In reply to Best way to do this by PetreAdi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |