This will only work for small files.

Code:
var %i = 1, %lines = $lines(%file), %text
while (%i <= %lines) {
  %text = %text $read(%file,%i)
  inc %i
}