in reply to Re^2: In place edit does not work on Windows
in thread In place edit does not work on Windows
{ # Need to add tags of <vom> and <\vom> at the # start and end of the file # Doing this below, but in a different block # of code to not disturb ARGV $out->[1] =~ s/\\/\\\\/g; # for windows local @ARGV = ($out->[1]); local $^I = '.bk'; while (<>) { if ($. == 1) { print "<vom>\n"; } else { print; } } open(APP, ">>$out->[1]"); print APP "\n</vom>\n"; close(APP); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: In place edit does not work on Windows
by Corion (Patriarch) on Mar 22, 2012 at 11:06 UTC | |
|
Re^4: In place edit does not work on Windows
by furry_marmot (Pilgrim) on Mar 22, 2012 at 18:36 UTC | |
|
Re^4: In place edit does not work on Windows
by Anonymous Monk on Mar 22, 2012 at 11:19 UTC |