Updated perl script.