Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    open(OUT, "> $file.new") || die"NEW FILE ERROR: Unable to create new f
    +ile: $!\n";
    
    my $data=join('',<FILE>);
    
  2. or download this
    $data =~ s/(CREATE TABLE "SO"\.")([^"]+)(.+?)(PRIMARY KEY)/$1$2$3CONSTRAINT PK_$2 $4/msg;
  3. or download this
    print OUT $data;
    
    ...
    
    close(OUT) || die "Unable to close OUT file: $!\n";
    close(FILE) || die "Unable to close OLD file: $!\n";