mart,
'Else' is redundant
Code:

Break on
;
$sourcefile = "d:\XMLfile.xml"
$newfile = "d:\newXMLfile.xml"
;
$rc = Open (1, $sourcefile, 2)
$rc = Open (2, $newfile, 5)
;
$line = ReadLine (1)
While @ERROR = 0
If InStr ($line, "This is too cool")
$line = Split($line, "This is too cool")
$line = Join ($line, "Dude")
EndIf
$rc = WriteLine (2, $line + @CRLF)
$line = ReadLine (1)
Loop
;
$rc = Close(1)
$rc = Close(2)

_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)