Skip to content

Instantly share code, notes, and snippets.

@tricker
Created April 30, 2012 21:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tricker/2562952 to your computer and use it in GitHub Desktop.
Save tricker/2562952 to your computer and use it in GitHub Desktop.
Yet another file parser
#!/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