Alter table <table_name> modify constraint <constraint_name> intially deferred;

Make sure your perl script has the priveledge to run that command also.