Ok, hope you know how to write to a file. And since you noticed that you sorted the collection, I suppose you are Customerordered the way you want.
Then what can you do:
(whitepages collect: [ :customer |
customer name,
Character cr asString,
customer number ]) joinUsing: Character cr
, . , name number , asString .
- - :
whitepages do: [ :customer |
stream
nextPutAll: customer name;
cr;
nextPutAll: customer number;
cr ]
stream - .