Perl script to update entity values against metadata in v6