http://qs321.pair.com?node_id=1218097

One line web interface to the 3 main Perl search engines at Perldoc, CPAN and Perlmonks with 3 lovely camels! Handcrafted in quirks mode with white text on a CPAN blue background, the camel favicon and camel background are inlined from perl.com, while a big unicode camel links to Perlmonks Super Search. It writes the page to an HTML file and tries to open it in the preferred web browser of most operating systems:

Screenshot: http://i67.tinypic.com/14a96jk.jpg

perl -e'$u="use.perl.html";open$o,">$u"||die"$!";print$o q(<html><head +><title>#!/usr/bin/perl</title><link rel="icon" href="https://www.per +l.com/favicon.ico" type="image/x-icon"><style>body{font-family:sans-s +erif}.c{background-color:#006699;color:#FFFFFF}.a{position:absolute}< +/style><script type=text/javascript>pd="https://perldoc.perl.org/sear +ch.html";cp="https://metacpan.org/search"</script></head><body class= +c onload=document.f.q.focus()><div style="background-image:url(https: +//www.perl.com/images/site/Perl_Camel.svg);background-repeat:no-repea +t;background-size:cover;width:100%;height:100%;opacity:0.2"></div><di +v style=top:0px;left:0px;width:100% class=a><ul><h1>USE<span style=fl +oat:right><span style=top:15px;left:25% class=a><FORM name=f><input t +ype=submit value=PERLDOC class=c onclick="document.f.action=pd;docume +nt.f.submit()">&nbsp;<input name=q id=q type=text size=22 class=c>&nb +sp;<input type=submit value=CPAN class=c onclick="document.f.action=c +p;document.f.submit"></FORM></span></span></h1></div><a href=https:// +perlmonks.org/?node=Super%20Search style=text-decoration:none;font-si +ze:64px;right:6px;top:6px class=a>&#128042;&nbsp;</a><span style=font +-size:10em;bottom:15px;left:50px class=a>PERL!</span></body></html>); +close$o;$_=$^O;if(/darwin/){$x="open $u"}elsif(/m(swin|sys)/){$x=q(st +art "" "$u")}elsif(/cyg/){$x=q(cmd.exe /c start "" "$u ")}else{$x="xd +g-open $u"}system$x'


STOP REINVENTING WHEELS ⚛ START BUILDING SPACE ROCKETS!CPAN 🐪

Replies are listed 'Best First'.
Re: Preaching to the camel
by Anonymous Monk on Jul 08, 2018 at 14:03 UTC
    Newsflash, perl can still print strings....