[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] splice-operation does not work !!!



Hi there!
First thanks to Alan for the "Directory"-Tips, i will try it tomorrow, but
know i have a new problem:

I am sure , that it is my own stupidity, but i cannot go any further.
Thats the problem:

I am working on a script, that generates a Link-Hotlist out of a textfile.
This are the steps i thought would be to make it run.
1. Read in the OLD HTML-Page line by line and put it inot an array
2. Read in the NEW 10 Lines with the actual 10 Links
3. Drive through the OLD array til i reach a MARKER (i.e. "<!-HOT LINKS>")
4. Replace the ten OLD values with the 10 new values
5 Write the whole array back to a textfile.

Quite simple!
The problem is, that by simply assigning the variables
$var{x).......$var{x+10} works, but the old are not deleted, so at the end
i find 20 Links, what i do not want.
The second try was with the splice-oparator. But it does not work either.

Has somebody gone through similar problems and can help me. If you like i
could also send you the whole thing i am sure it is programmed very
complicated, but so far it worked quite well.

Thanks!

Bye Luigi !


Luigi Rensinghoff
Hohe Pforte 13/17
50676 Kšln
Tel.: 0221-241-21-27