Link to home
Start Free TrialLog in
Avatar of CODER
CODER

asked on

Reading a line and then deleting the line

How do i READ A LINE from a file and then after reading it, then delete that line....  assuming I have a bunch of lines...

thanks
ASKER CERTIFIED SOLUTION
Avatar of maneshr
maneshr

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lambda
lambda

if (/^#/){

maneshr: I think this line has to be modified. CODER wants some particular lines to be deleted, so it shld be quite the opposite check. Something like, lines starting with '#' are to be deleted.
 
lambda,

like i said in my comment ...

"you can replace the if with any condition that you are looking for. "

the script is just a sample that shows one how to do the "delete".
i have left the exact condition for the delete to the user.

i would suggest that we leave the interpretation of the delete to CODER.

if CODER can provide the exact condition, only then can i modify the if statement.

Rgds
CODER,

was the solution that i gave you not up to your requirements??

what additional items were you looking for in your script??

do let me know.
Avatar of CODER

ASKER

it was cool naneshr... thanks.,.
glad to know that.

the reason i asked the same was because you had graded the answer B.
therfore i was wondering if i had missed out on some point.

Rgds