foreach $table (@tables) { chomp $table; print OUTFILE <<"EOT"; BEGIN DBMS_REPCAT.CREATE_MASTER_REPOBJECT ( gname => 'beastdb_mstr_grp', type => 'TABLE', oname => '$table', sname => '$schema', use_existing_object => TRUE, copy_rows => FALSE); END; / EOT }