If you edit the file in-place (e.g., open( FILE, "+<", $fileName );), the resource fork will be preserved while you edit the data fork. However, I'm not sure if your batch edits would work well with this approach. If you have access to a Mac OS X system, perl is already installed. Otherwise, installing MacPerl is straightforward.