in reply to Remove a line from a file using perl one liner

you should be able to do an inplace edit. perl -pi -e 's/$string_to_be_removed//g' full_path/one.txt obviously if you use windows, in-place edit won't work.You can try
#!/usr/bin/perl BEGIN {(*STDERR = *STDOUT) || die;} use diagnostics; use warnings; use strict; $| = 1; my $file = full_path/one.txt; @ARGV = $file; $^I = '~'; while (<>) { binmode ARGVOUT if $. == 1; s/$string_to_be_removed//g; print; }
i am just trying to help.Please do check if the windows code works.I am not sure if it could throw any errors.It works fine for a substitute for me on activeperl on windows xp.I also do the replace on all files in a directory.

-Smanicka