transfer from internal tree r5311 branches/1.4-gpl
[xonotic/netradiant.git] / docs / developer / RegExp / replace.pl
1 #!perl\r
2 rename("$ARGV[0]", "$ARGV[0].old");\r
3 open(FILE, "$ARGV[0].old");\r
4 open(OFILE, ">$ARGV[0]");\r
5 while(<FILE>)\r
6 {\r
7 if($. != $ARGV[1])\r
8 {\r
9 print OFILE;\r
10 next;\r
11 }\r
12 s/Sys_Printf \(/Sys_FPrintf \(SYS_VRB,/;\r
13 s/Sys_Printf\(/Sys_FPrintf \(SYS_VRB,/;\r
14 print OFILE;\r
15 }\r
16 close(OFILE);\r
17 close(FILE);