in reply to why does 'sed' remove the entire line?

All you need is to get rid of the last blank before you use the concatenated IP's;

open(SESIP2, ">sesip2"); open(MYINPUTFILE, "sesip1"); my $line = <MYINPUTFILE>; while (<MYINPUTFILE>) { my($line) = $_; chomp($line); print SESIP2 " $line"; } close(MYINPUTFILE); close(SESIP2); open(SESIP3, ">sesip3"); open(MYINPUTFILE, "sesip2"); while (<MYINPUTFILE>) { my($line) = $_; chomp($line); # this is the added line <---------- print SESIP3 "dest \($line\)"; } close(MYINPUTFILE); close(SESIP3);

Replies are listed 'Best First'.
Re^2: why does 'sed' remove the entire line?
by ddrew78 (Beadle) on Jun 10, 2010 at 16:07 UTC
    I tried that, but instead of having a space before the ")", this just put it after the "(" instead. But thanks for the help.