CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate: Re: [zapzap] Remove lines: Edit Log



Laurent_R
Veteran / Moderator

Oct 21, 2013, 1:19 PM


Views: 9626
Re: [zapzap] Remove lines

Something like this:


Code
while (<$IN>) {      # reading the file line by line 
next if /^\s*$/; #skipping blank lines (empty or only white spaces)
print $OUT $_; # print other lines to output file
}



(This post was edited by Laurent_R on Oct 21, 2013, 1:19 PM)


Edit Log:
Post edited by Laurent_R (Veteran) on Oct 21, 2013, 1:19 PM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives