XP is just a number | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Allow me some comments ...
I think putting command-line switches into the she-bang is not one of the better ideas, I doubt it's portable. HaukeX just offered an alternative special variable, which even has a full English name $INPLACE_EDIT which is also self documenting. And you've rather got bitten here by the effects of slurping the whole file into an array which is often a dangerous idea, because the size might be huge. I prefer lazy iteration by working line by line, whenever possible. And making a full copy in RAM first is rather the strategy when you intend to directly replace the content in the filesystem, so you somehow doubled the efforts to a paradox effect. Just my 2 cents ... :)
Cheers Rolf In reply to Re^3: Command Switch -i prints to screen not file
by LanX
|
|