Skip to main content
replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link

#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 KaronenIlmari 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 postsIlmari'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. :-)

#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. :-)

#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. :-)

deleted 35 characters in body
Source Link

#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, created by Ilmari himselfwhich I first saw in one of Ilmari's other posts:

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

(I first saw this quine in another similar challenge.)

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

#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, created by Ilmari himself:

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

(I first saw this quine in another similar challenge.)

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

#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. :-)

Saved 3 bytes thanks to Ilmari Karonen!
Source Link

#Perl 5.10+, 4040 37 bytes

eval while$_=q$_=q{say"evalsay"\$_=q{$_};eval"while while\$_=q1};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 'eval while$_=q'$_=q{say"eval while\$_=q{$_}"}' eval while$_=q{say"eval while\$_=q{$_}"} eval while$_=q{say"eval while\$_=q{$_}"} eval while$_=q{say"eval while\$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 is a, as well as the shorter 37-byte solutions above, are all simple variationvariations of the following quine, which I first saw in one of Ilmari Karonen's posts, although I'm not certain of the origincreated by Ilmari himself:

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

(I first saw this quine in another similar challenge.)

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

#Perl 5.10+, 40 bytes

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

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

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

This is a simple variation of the following quine, which I first saw in one of Ilmari Karonen's posts, although I'm not certain of the origin:

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

#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, created by Ilmari himself:

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

(I first saw this quine in another similar challenge.)

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

Added attribution.
Source Link
Loading
Source Link
Loading