in reply to (jeffa) Re: ident.pl
in thread killlastdot.pl

Also, if you don't mind "hard coding" the word you want to match in the code, this can be trimmed down to a one liner

Nevermind "hard coding" it... and on Unix, you might as well replace it with an alias. Here's how I'd do that in my shell (bash):

alias rmdots="perl -pe 's/\.\$// if /@{[shift]}/'"
Uh... (test first!) Make that:
alias rmdots="perl -pe 'BEGIN{\$p=shift}s/\.$// if /\$p/'"
Usage would be: rmdots pattern file ...

-sauoq
"My two cents aren't worth a dime.";