Skip to main content
4 of 5
deleted 35 characters in body

#Perl 5.10+, 40 37 bytes

$_=q{say"\$_=q{$_};eval"while 1};eval 

or (also 37 bytes)

$_=q{{say"\$_=q{$_};eval";redo}};eval 

Invoke with the -M5.010 or -E command line flag, e.g.

$ perl -E '$_=q{say"\$_=q{$_};eval"while 1};eval' $_=q{say"\$_=q{$_};eval"while 1};eval $_=q{say"\$_=q{$_};eval"while 1};eval $_=q{say"\$_=q{$_};eval"while 1};eval ... 

Thanks to Ilmari Karonen for shaving off 3 bytes from my original solution, which was:

eval while$_=q{say"eval while\$_=q{$_}"} 

This, as well as the shorter 37-byte solutions above, are all simple variations of the following quine, which I first saw in one of Ilmari's other posts:

$_=q{say"\$_=q{$_};eval"};eval 

Since all I added in my original solution was a while loop, he really deserves most of the credit. :-)