http://qs321.pair.com?node_id=729477

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I have a filename foo.bar.txt and I want to remove the file extension so that only foo.bar remains. Note, the file extension might not always be .txt.

I've tried s/\..*/ but that removes everything after the first period and I'm left with only foo for my filename.

Thank you. Any help you could provide would be greatly appreciated.