Chapter 5

Using Strings and Lists

This chapter describes how to use Tcl strings and lists for common data-searching applications. A common programming task is extracting one piece of information from a large mass of data. This section discusses several methods for doing that and introduces a few more Tcl concepts and commands along the way.

For the application, we will find the Noumena Corporation home page in a list of uniform resource locators (URLs) for some Tcl information and archive sites. The following is the starting data, extracted and modified from a browser’s bookmark file.

% set urls { "Tcler’s Wiki" "Tcl/Tk Fossil Core" "Sourceforge Tcl" "Sourceforge ...

Get Tcl/Tk, 3rd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.