Write a Perl script that can parse, read, manipulate and write data from and to a JSON file, using built-in or external libraries as necessary. The script should include error handling and proper documentation.
This prompt doesn't seem malicious.