...or, using substr() as an lvalue:
substr($n,rindex $n,'.') = ''; [download]
In reply to Re^2: Regex To Remove File Extension (rindex) by almut in thread Regex To Remove File Extension by Anonymous Monk