in reply to parse file name
my ($volume, $directories, $file) = File::Spec->splitpath( $path );
my ($extension) = $file =~ /\.([^\.]+)$/;
So if you want to DWIM, you'd have to keep a list of known file extensions that contain a dot, and special case them.
Or you could consider it to be a recursive definition, so that .gz is the extension of the perl-5.10.1.tar, and .tar is the extension of perl-5.10.1.
6 of one, 1/2 dozen of another.
Please consider supporting my wife as she walks in the 2009 Alzheimer's Walk.
A photo of people (family, friends, myself, ...)
A photo of my pet(s)
A photo of something man-made (cars, machines, etc.)
A photo of nature, space, or something else not man-made
An abstract pattern
Artwork, digital or photographed
A solid color
A digital animation
Whatever my desktop environment has set for me by default
I haven't seen my background in weeks, too many windows covering it!
Results (101 votes). Check out past polls.