Re: Removing lines from start of tag to end of tag in XML's

2008-07-05 Thread vigneshwara balaji
Hi Rob, Thank you for that input. I was also enable to successfully complete the same with the below script. (its a mix up from various scripts :D) $file1 =""; # input file $file2=".new"; my $flag=0; #output file open(INFO,"$file1"); # Open the first file open(OUT,">$file2");

Re: Removing lines from start of tag to end of tag in XML's

2008-07-05 Thread Rob Dixon
Rob Dixon wrote: > > Meanwhile, how about a simpler solution like mine below, which I think is much > more readable. > > HTH, > > Rob > > > > > use strict; > use warnings; > > my $source = ''; > my $new = '.new'; > > open my $in, '<', $source or die $!; > open my $out, '>', $new or

Re: Removing lines from start of tag to end of tag in XML's

2008-07-05 Thread Rob Dixon
vigneshwara balaji wrote: > > Thank you for that input. I was also enable to successfully complete the > same with the below script. (its a mix up from various scripts :D) You must always use strict; use warnings; at the start of your code, and declare all variables with 'my'. That way a lot

Re: Removing lines from start of tag to end of tag in XML's

2008-07-04 Thread Rob Dixon
life is beautiful wrote: > Hi All, > Can some one help me gain knowledge as how I can > delete few lines from XML. > > Example > > java:/LockTestDb > javax.sql.DataSource > Application > Shareable > > > wm/default > com.ibm.web

Removing lines from start of tag to end of tag in XML's

2008-07-04 Thread life is beautiful
Hi All, Can some one help me gain knowledge as how I can delete few lines from XML. Example java:/LockTestDb javax.sql.DataSource Application Shareable wm/default com.ibm.websphere.asynchbeans.WorkManager Container

Re: Removing lines

2007-04-16 Thread Xavier Noria
On Apr 15, 2007, at 6:38 PM, Mário Gamito wrote: I have this site that auto generates an index.html file every 15 minutes (it's a blog aggregator). I need that every time the file is generated, all the contents between the lines href="http://domain.com/2006/08/bourne-shell.html";>Bourne Shell

Removing lines

2007-04-16 Thread Mário Gamito
Hi, I have this site that auto generates an index.html file every 15 minutes (it's a blog aggregator). I need that every time the file is generated, all the contents between the lines http://domain.com/2006/08/bourne-shell.html";>Bourne Shell and http://domain.com/2006/08/bourne-shell.html";>S

Re: Removing lines

2007-04-15 Thread yitzle
Untested code: (In the RegEx, I replace / with . because it should work fine and looks less messy - and . is not escaped.) # File - source open FILE, "< file.html"; my $delete = 0; # Start by not deleting my $output = ""; my $deletedAlready = 0; my $searchString = 'http://domain.com/2006/08/bour

Re: Removing lines

2007-04-15 Thread Omega -1911
On 4/15/07, Mário Gamito <[EMAIL PROTECTED]> wrote: Hi, I have this site that auto generates an index.html file every 15 minutes (it's a blog aggregator). I need that every time the file is generated, all the contents between the lines http://domain.com/2006/08/bourne-shell.html";>Bourne Shell

Removing lines

2007-04-15 Thread Mário Gamito
Hi, I have this site that auto generates an index.html file every 15 minutes (it's a blog aggregator). I need that every time the file is generated, all the contents between the lines http://domain.com/2006/08/bourne-shell.html";>Bourne Shell and http://domain.com/2006/08/bourne-shell.html";>S