diff options
Diffstat (limited to 'include/control/uncomment.pl')
-rwxr-xr-x | include/control/uncomment.pl | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/control/uncomment.pl b/include/control/uncomment.pl new file mode 100755 index 0000000..f06f52c --- /dev/null +++ b/include/control/uncomment.pl @@ -0,0 +1,24 @@ +use strict; +use warnings; + +foreach (@ARGV) +{ + + open FILE, $_ or die "Couldn't open file: $!"; + my $string = join("", <FILE>); + close FILE; + + $string=~ s|/[*].*?[*]/||sg; + $string=~ s/virtual//sg; + $string=~ s/=0;/;/sg; + $string=~ s/(^|\n)[\n\s]*/$1/g; + + open F, ">$_" or die "Couldn't open file: $!"; + print F $string; + close F; +} + + + + + |