@files = ('hello.txt', 'perl.bmp'); print join "\n", map { s/(.+)\..+$/$1/;$_} @files;