I’m not sure why you want to split data and chomp them. Why
not just:
read data into a string (with compressing)
send cgi.escape(string) or string.dump
–
Nobu Nakada
I did not see anything on reading an entire file straight into a string. I did find that readlines makes each line an array element. I am very
curious how you read a whole file into a string…?
I did not see anything on reading an entire file straight into a string. I
*did* find that readlines makes each line an array element. I am very
curious how you read a whole file into a string...?
pigeon% cat b.rb
#!/usr/bin/ruby
p IO.readlines('b.rb', nil)[0]
pigeon%
On Thu, Nov 14, 2002 at 11:56:39PM +0900, Vera, Michael wrote:
I did not see anything on reading an entire file straight into a string. I did find that readlines makes each line an array element. I am very
curious how you read a whole file into a string…?