Probably the easiest way to do it is copy the file to the local system with scp or rcp or Net::FTP or somehing like that, edit it, and then push it back up... all of with can
be done within perl... you could overload or simply create an
open routine which did that for you, and wrote it back on close...