Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple substituting problem.

Status
Not open for further replies.

DJpennywhistle

Programmer
Jun 1, 2000
32
0
0
US
Visit site
When I substitute for a line to remove it <br><br>s/blah*_\*blah\//;<br><br>I am still left with white space in empty lines. Is it possible&nbsp;&nbsp;to remove the string anf the line. <p>Gordon Bell<br><a href=mailto:gordon.bell@xilinx.com>gordon.bell@xilinx.com</a><br><a href= > </a><br>
 
hi gordon,<br><br>the script:<br><FONT FACE=monospace><b><br>while(&lt;&gt;){<br>&nbsp;&nbsp;&nbsp;next if /^\s*$/;<br>&nbsp;&nbsp;&nbsp;print;<br>}<br></font></b><br><br>will remove blank and empty lines from a file for you -- is that what you meant?<br> <p>Mike<br><a href=mailto:michael.j.lacey@ntlworld.com>michael.j.lacey@ntlworld.com</a><br><a href= Cargill's Corporate Web Site</a><br>
 
Perfect - thanks Mike <p>Gordon Bell<br><a href=mailto:gordon.bell@xilinx.com>gordon.bell@xilinx.com</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top