Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
laziness, impatience, and hubris
 
PerlMonks

cgi quine

by jonadab (Parson)
 | Log in | Create a new user | The Monastery Gates | Super Search | 
 | Seekers of Perl Wisdom | Meditations | PerlMonks Discussion | 
 | Obfuscation | Reviews | Cool Uses For Perl | Perl News | Q&A | Tutorials | 
 | Poetry | Recent Threads | Newest Nodes | Donate | What's New | 

on Mar 09, 2003 at 18:15 UTC ( #241590=obfuscated: print w/ replies, xml ) Need Help??

Not really obfuscated per se, but it sure doesn't belong in any of the other categories, so... here is my first Perl quine that doesn't cheat by reading its own source code:


#!/usr/bin/perl $p='$q=chr(39);$t=chr(34);$h="Content-type: text/html\n\n<h" ."tml><head><title>$0</title></head><body><pre>#!/usr/bin/p" ."erl\n\$p=$q";$_=$p;$\="$q;eval\$p;</pre></body></html>$/"; s/&/&amp;/g;s/</&lt;/g;s/>/&gt;/g;s/$q/&#39;/g;s/$t/&quot;/g ;print$h.$_;';eval$p;

Comment on cgi quine
Download Code

Login:
Password
remember me
What's my password?
Create A New User

Node Status?
node history
Node Type: obfuscated [id://241590]
Approved by mowgli
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (23)
BrowserUk
merlyn
Corion
GrandFather
shmem
jdporter
Your Mother
toolic
holli
Gavin
atcroft
dhoss
kennethk
MidLifeXis
thezip
Eyck
pileofrogs
clinton
Utilitarian
bichonfrise74
ssandv
MikeDexter
im2
As of 2010-02-09 20:21 GMT
Sections?
The Monastery Gates
Seekers of Perl Wisdom
Meditations
PerlMonks Discussion
Categorized Q&A
Tutorials
Obfuscated Code
Perl Poetry
Cool Uses for Perl
Perl News
Information?
PerlMonks FAQ
Guide to the Monastery
What's New at PerlMonks
Voting/Experience System
Tutorials
Reviews
Library
Perl FAQs
Other Info Sources
Find Nodes?
Nodes You Wrote
Super Search
List Nodes By Users
Newest Nodes
Recently Active Threads
Selected Best Nodes
Best Nodes
Worst Nodes
Saints in our Book
Leftovers?
The St. Larry Wall Shrine
Offering Plate
Awards
Craft
Snippets Section
Code Catacombs
Quests
Editor Requests
Buy PerlMonks Gear
PerlMonks Merchandise
Planet Perl
Perlsphere
Use Perl
Perl.com
Perl 5 Wiki
Perl Jobs
Perl Mongers
Perl Directory
Perl documentation
CPAN
Random Node
Voting Booth?

What level of existential comfort do you require?

Palace
Executive suite at the best hotel
Regular hotel in a decent part of town
Motel
Boarding house
Sleeping Bag on Couch in Basement
Any port in a storm
Camping under the freeway overpass
Jail
Other

Results (279 votes), past polls