kennygadams
Programmer
I'm trying to get file extensions by pattern matching but I run into problems if the filename contains more then one period. some of the filenames that I work with contain 5+ periods which throws the script off so I need look for the last period and then copy the characters after that. any help is greatly appreciated.
And here is what I have so far:
And here is what I have so far:
Code:
$filename = 'A10.300.jpg';
$filename =~ m/\.(.*)$/;
# currently $1 = 300.jpg