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: Beginner:
Need help on removing contents on a file Selectively

 



yick
New User

Aug 26, 2009, 1:14 AM

Post #1 of 3 (264 views)
Need help on removing contents on a file Selectively Can't Post

Hi Gurus,

I'm very new on Perl and even newer in terms of file concent modification. I'm currently working on a script to selectively remove contents from a file. The file concent goes like this:

Domain A
{
}


Domain B
{
}


Domain C
{
Yes
}


How can i program a perl script to remove Domain A and Domain B, which contains nothing within bracket but preserve Domain C, which has content within the bracket? After executing the script, i will only have


Domain C
{
Yes
}


Thank you very much for your help. Smile

-Yick the newbie


1arryb
User

Aug 26, 2009, 7:28 AM

Post #2 of 3 (261 views)
Re: [yick] Need help on removing contents on a file Selectively [In reply to] Can't Post

Hi yick,

Please post an actual sample of your data (you can use the file attache button).

Thanks,

Larry


yick
New User

Aug 26, 2009, 6:40 PM

Post #3 of 3 (252 views)
Re: [1arryb] Need help on removing contents on a file Selectively [In reply to] Can't Post

Hi 1arryb,



Here's one of the sample. Appreciate your help.



-yick
Attachments: Domain_val.txt (0.36 KB)

 
 


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

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