perl - Copy data between two strings excluding identifiers -


i want read data between 2 strings , paste new file....

open ($gen_xml,">test.xml") or die "can not open file $gen_xml : $!\n" ;  $i='start'; $j='end'; while($line = <$fh>){     if ($line =~ /$i/../$j/)          { print $gen_xml $line; } } 

just add following 2 lines in code above print statement

$line=~s/$i//; $line=~s/$j//; 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -