I've to read a part of an html page I receive using socket. The html page has 5-6 long lines so I've to use the binvars to store data. I use bfind to search the part I've to read (the begin is <div id="foo"> the end is the next </div>). The script works if both the begin and the end are in the same binvar (I use sockread &var, so the &var is overwritten each time) but if </div> is on the next &var it doesn't work.
I tried to join the chunk that I read using bcopy but it didn't work so i write all the page in a file but now i don't know how to search <div id="foo">, if I use /fseek with -w it returns a wrong position and I also don't know how to read N bytes from the fpointer using $fread. I should copy again the file in a binvar, but I don't know if I can copy the whole file in a single binvar...
I've to find a way to read the text between <div id="foo"> and </div>, if you have any idea let me know.