How do I get readdlm to return a Matrix of strings?

I would have probably done the following given that your words are on separate lines:

julia> function get_lowercase_lines(io = open("test.txt"))
           lowercase_lines = String[]
           for line in eachline(io)
               push!(lowercase_lines, lowercase(line))
           end
           return lowercase_lines
       end
get_lowercase_lines (generic function with 2 methods)

julia> get_lowercase_lines()
3-element Vector{String}:
 "hello"
 "false"
 "goodbye"

eachline is a lazy iterator. It does not allocate a String array to start.

1 Like