On Tue, 08 Apr 2008 20:05:44 +0200 Tony Balinski <ajbj at free.fr> wrote: Hi, > Alternatively, > s = read_file(filename) > nls = replace_in_string(s, ".*", "", "regex") > return length(nls) + (s != "" && substring(s, -1) != "\n") I like this nice elegant method. Alexey