给 perl hacker 们看的[11]

[入库:2005年8月28日] [更新:2007年3月25日]

本文简介:选择自 eternalee 的 Blog

<dir> <li> Go for Perl! </dir> <font size="+1"><strong>
 Author: Casey Tweten, 100% Perl Geek </strong> </font>
%%
#Casey West
$_=`perldoc -qjaph`=>s`.+"(.+)".+`$1\n`s=>s`\b([^a])`\u$1`g=>print;
%%
#Casey West
sub q{print};;$_=eval q.q;
# Just another Perl Hacker
;;.;s;.+?\b;;s;eval qq;&q;
%%
#Casey West
sub ::(Just{another}Perl{Hacker}){(
$,=>$\)=(q q q=>q q q)=>prototype\&
::}@(=split q q\{([^\}]+)\}q=>eval{
eval qq:&\:\::};{(print(@(=>"\n"))}
%%
#Casey West
map{s[[^\@\$]][]go=>chomp,$_=[split/(\@+\$*)/=>$_]=>map{$_?do{s(
(\@+)(\$*))(chr((length$1)*10+length$2))ex=>print}:1}@$_}<DATA>,__END__
sub proto(@@@@@@@$$$$@@@@@@@@@@@$$$$$$$@@@@@@@@@@@$$$$$
@@@@@@@@@@@$$$$$$@@@$$@@@@@@@@@$$$$$$$@@@@@@@@@@@
@@@@@@@@@@@$@@@@@@@@@@@$$$$$$@@@@@@@@@@$$$$
@@@@@@@@@@$@@@@@@@@@@@$$$$@@@$$@@@@@@@@
@@@@@@@@@@$@@@@@@@@@@@$$$$@@@@@@@@@@$$$$$$$$
@@@$$@@@@@@@$$@@@@@@@@@$$$$$$$@@@@@@@@@$$$$$$$$$
@@@@@@@@@@$$$$$$$@@@@@@@@@@$@@@@@@@@@@@$$$$@){&proto}
%%
#Casey West
#!/usr/local/bin/perl -w
use strict;$|++;$_=q{<}.
q{leo%mbwf<?BUBE=fmjix}.
q{!`%-0/]0ujmqt~*udp)s}.
q{id|qbn-((ojpk>/leo%-}.
q{qnpid<leo%zn}=>s{(.)}{
chr((ord $1)-1)}xeg;eval
scalar reverse;#IP magic
__END__
160.141.143.153
141.147.145.40
112.165.163.164
73.163.165.142
40.141.156.157
164.150.145.162
173.50.143.141
154.154.145.162
50.60.51.51
40.133.63.135
175.12.160.141
143.153.141.147
145.40.120.145
162.154.73.163
165.142.40.110
141.143.153.145
162.40.173.50
143.141.154.154
145.162.50.60
51.51.40.133
63.135.175.12
160.141.143.153
141.147.145.40
155.141.151.156
73.160.162.151
156.164.40.152
157.151.156.40
47.40.47.54
40.163.160.154
151.164.40.155
47.72.72.47
54.12.152.157
151.156.47.72
72.47.54.112
165.163.164.72
72.141.156.157
164.150.145.162
54.120.145.162
154.72.72.110
141.143.153.145
162.56.42.134
156.42.73.12
%%
#Jeff Pinyan <jeffp@crusoe.net>
M^q@@;BEGIN{close"stderr"}print+H|R&k,G^w|E,Q&x|c,,,,
M&~i|t,,,q^&q|^^q&l],&^q|jm>|,N|d|A&c,v&q~|~,c^H^C,w&
M|a,qq<\x11A"\x17\x1b\x09Rh\x0d\x0c\x18\x11x>^<<,,,,,
carrier lost

,,;!EOF
%%
#Joey Mitchell Comeau <aw096@chebucto.ns.ca>
perl -e '$_=$\=" perl hacker,";$_&="B";$_|=("B"|"H");$_|="Just another";print;'
%%
#Lauren Smith <LaurenS@bsquare.com>
print grep ord $_,map{y/a-zA-Z//d;$x.="+ $_";chr(eval $x)
}'J74u43-s2tA1-84n33o45th1er5-12-P3e13-82r48l21H13-a6-76
c40k25er2wx8-y6z13-81'=~m#([^!\n]{3})#g#tr/-0-9//d;print
%%
#Robin Houston <robin@kitsite.com>

The notorious French literary group _Oulipo_ came up with
the following scenario: A prisoner has a very limited supply
of paper to write on, and so in order to conserve this scarce
resource he decides to use only those letters which extend
neither above nor below the line: aceimnorsuvwxz

Ian Monk's _a russian con's economic missive_
 (http://www.kitsite.com/~robin/ou-x-po/talk/prisoner.html)
is an example of writing within this constraint.


Naturally, I'd like to apply this idea to Perl. Because
non-alphabetic symbols are so important to us, it was
obviously necessary to extend the idea a little. I
analyzed my terminal font, and decided that the characters

  &+-.:<=>acemnorsuvwxz~

went neither too far up nor too far down. Naturally the results
may be a little different for other fonts, but I needed a
standard. So I started to program in this restricted Perl.

It's a frustrating little language, but rather beautiful.

A JAPH:

s==x= && s==.er & xac.uc coer= && s==m--+m--+m--+m--=e &&
s==xac.~o= && s=.+=<<x& evam=ee &&
eva~
x
s=c.=c= && s=x=xz&<<o=e &&
xm
o
s=x=x = && s=x=<<xc& <<xo =e&&
x~
xc
xm
xo
s=x=xer= && s=x=xr& xu=e && s=x=xer = && s=x=xx & uc xn=e &&
s=.=xu & <<o=e &&
x~
o
s=x=x ano= && s=x=xu & <<o=e &&
x~
o
s=x=xus= && s=x=xo & uc xz=e && s=
== && s=.== && s=.+=reverse uc=e && s=.=
r= && s=.+=reverse uc=se &&

warn uc


本文关键:perl
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top