Srinivas JONNALAGADDA wrote:
> Dear all,
> 
> I was trying the well-known problem of writing a program that outputs
> itself. Here is first trial.
> 
> s = "\nprint \"s = \\\"\"\n0.upto(s.length) { |i| printf(\"%c
> \", ?s[i]) }\nprint \"\\\"\"\nputs s"
> print "s = \""
> 0.upto(s.length) { |i| printf("%c", ?s[i]) }
> print "\""
> puts s
> 
> However, I am having a difficulty self-printing the literal line. Could
> someone help?

All I can say is, find the tutotials and follow them.

I have difficulty reading other people's quines. :)
Maybe it is a one-person task, like driving nails.

The first ones I wrote are at http://rubyhacker.com


Cheers,
Hal