"David --- Senior Programmer Analyst --- Wgo Wagner" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Under w2k I was unable to do an inline update without some type of > backup. Tried from command line and korn shell. If I did this: > > perl -p -i.plsdel -e "s/^\s*\n//" 03WorkSheet.txt > which would create a copy with the name 03WorkSheet.txt.plsdel and > 03WorkSheet.txt would be without the blank lines. > > I tried the oneliner with "redo if ..." but it only hung on me, so > unsure what I was happening there. >
You're right, I'm wrong, and I hereby resign. perl -p -i -e "redo if /^\s*$/" file.ext is completely wrong, as the redo doesn't pull in the next line from the input. It simply retests the same blank line indefinitely. The neater perl -p -i -e "s/^\s*$//" file.ext is the correct way. Apologies to all, Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]