in reply to Update works for line...deletes other records
From 'man perlrun':
specifies that files processed by the "<>" construct are to be
edited in-place. It does this by renaming the input file, opening
the output file by the original name, and selecting that output
file as the default for print() statements.
Okay, so once perl renames the original file, the original file name doesn't exist anymore. Subsequently, when perl opens a file name that doesn't exist for writing, what's in that file to start?