'#{File.read("file")}' puts
Does not work. Is it possible to read in the content of a text file in GolfScript
?
The #{...}
expansion only occurs with double-quoted strings:
"#{File.read('file')}" puts
works fine.
However, there are some catches.
'file'
to be a parameter, you have to delay the expansion."#{File.read('file')#1}"
, "#{File.read('file')#2}"
, etc.