in reply to printing "$" to php file
Hello flieckster,
I think you are looking for How to replace a string in a file with Perl. If not provide us a bit more information.
Hope this helps, BR.