« Computers can... | Main | Hewett's Observation »

May 13, 2005

Self printing code

Question: Can you write a program that prints itself?

Answer: Yup.

#!/usr/bin/perl -w
#
seek(DATA, 0, 0) ;
while()
{
        print ;
}
__DATA__

Posted by Ozguru at May 13, 2005 06:00 AM