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 } #### open (INFILE, "< $infile") or die "Couldn't open $infile: $!"; open (OUTFILE, "> $outfile") or die "Couldn't open $outfile: $!"; chomp, print OUTFILE <<"EOT" while ; # shorter version BEGIN DBMS_REPCAT.CREATE_MASTER_REPOBJECT ( gname => 'beastdb_mstr_grp', type => 'TABLE', oname => '$_', sname => '$schema', use_existing_object => TRUE, copy_rows => FALSE); END; / EOT close (INFILE); close (OUTFILE); #### foreach $table (@tables) { print OUTFILE (map "$_\n", "BEGIN", " DBMS_REPCAT.CREATE_MASTER_REPOBJECT (", " gname => 'beastdb_mstr_grp',", " type => 'TABLE',", " oname => '$table',", " sname => '$schema',", " use_existing_object => TRUE,", " copy_rows => FALSE);", "END;", "/\n", ); }