in reply to Using map to Add a Line Breaks to a List
@files = ('hello.txt', 'perl.bmp'); print join "\n", map { s/(.+)\..+$/$1/;$_} @files; [download]