Created
April 30, 2012 21:49
-
-
Save tricker/2562952 to your computer and use it in GitHub Desktop.
Yet another file parser
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
open INFILE, "input.sql" or die $!; | |
open OUTFILE, ">output.sql" or die $!; | |
while (<INFILE>) { | |
if (/^(?:(?!\s+\);).)*$/s) { | |
s/;/\//; | |
} | |
print OUTFILE; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment