#!/usr/bin/perl
@d = localtime(time);
if ($d[4] == 11 && $d[3] == 18 ) {
print "Happy ".($d[5]-87)."th Birthday, Perl!\n";
}
if( $ARGV[0] eq "love" || $ARGV[0] eq "hate" ) {
print "$you can't deny its contribution to our culture\n";
}
10 print "suck it, haters."
20 goto 10
30 end
$ans[1] = "Omitted in hopes that brevity would lessen the chance of deletion.";
$ans[2] = $ans[1];
$ans[3] = "On preview.";
$ans[4] = "Agreed. I wrote a quick sed statement* to semi-fix that for v0.2";
$ans[5] = "The whitespace is exactly as I like it. TMTOWTDI";
$ans[6] = "I'm waiting for it to show up in apt";
Plutor->(@ans);
sed 's/"$you/`whoami`."/' http://www.metafilter.com/67552/ (Yeah, I know.)# Snip..
if (substr($d[5],length($d[5])-1) eq "1") { $suffix="st"; }
elsif (substr($d[5],length($d[5])-1) eq "2") { $suffix="nd"; }
elsif (substr($d[5],length($d[5])-1) eq "3") { $suffix="rd"; }
else { $suffix="th"; }
# Snip..
print "Happy ".($d[5]-87).$suffix." Birthday, Perl!\n";
# Snip..#!/usr/bin/perl -l
$_=scalar localtime;
if (/Dec 18.* (\d+)$/) {
$a = ($1-1987);
$b = $a % 100;
print "Happy $a", $b > 3 ? "th" : $b == 3 ? "rd" : $b == 2 ? "nd" : "st", " Birthday, Perl!"
}
if (($_=shift) && /love/ || /hate/) {
print "You can't deny its contribution to our culture"
}perl -e '@d = localtime(time); ($p) = ($^X=~/^.*\/(.*)$/); $p=ucfirst($p); print "Happy ".($d[5]-87)."th Birthday, ".$p."!\n" if (($d[4] == 11) && ($d[3] == 18));'
sub o{$a=shift;return $a.($a%100>=11&&$a%100<>Apologies to the author of that ordinate postfix module. And to everyone, really.>$^X type thing, too.
sub o{$a=shift;return $a.($a%100>=11&&$a%100<=13?'th':$a%100%10==1?'st':$a%100%10==2?'nd':$a%100%10==3?'rd':'th')};print'Happy '.o($1*1-1987)." birthday, Perl!\n"if localtime=~/Dec\ 18.*(\d{4})/; @P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f^ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;printReason 11-∞
/;{}def/#{def}def/$_={/Times-Bold exch selectfont}#/_{rmoveto}#/"{dup}#/*/!/$
;/q{exch}#/x ; {/J q #}#/.{/T q #}#{stringwidth}#{}#{}# 14 string dup dup dup
260 40 moveto 90 rotate ; %/}};$0='"\e[7m \e[0m"';@ARGV=split//,reverse
q(ThePerl). q(Journal) x 220 ; q ; 0 T putinterval exch 7 J putinterval ;
; $_= q /m$ pop T($*!$"=!$ " )pop " * true% ? $ " $!" " !! !! % !" !" !
! charpath {!"""}pop $ pop{""!}pop ! neg{!#}pop 220 ! neg _{!!}pop J false %T
charpath clip " pop 0 " moveto 6{!!}pop $_= 105{!!}pop {$ ! $ " ! #! ##}
pop{dup dup $ ! " pop pop q{"}pop 22{dup show}repeat {"}pop q 22 mul{$ "} pop
neg{!#! $ "}pop ! 8 .65 mul{$ # # $}pop ! neg{"}pop _ pop{"}pop } repeat pop
" { $ " ! ! ! $ " ! !" "#" #"!"""""! #" " # "m/;@ARGV=(@ARGV[-14..-1])x50;q}
0 "%};s/m[ou]|[-\dA-ln-z.\n_{}]|\$_=//gx;s/(.)(?{$*=''})/('$*.='.(++$#
%2?'':"$0;").'pop;')x(ord($1)-31).'$*'/gee;s/((.(\e\[.m)*|.){77})/$1\n/g;print
; sub showpage {}
Neither are original to me. They're not even new. I keep them around whenever I starting thinking that perl might be handy to use on a daily basis.#include <stdio.h>
int l;int main(int o,char **O,
int I){char c,*D=O[1];if(o>0){
for(l=0;D[l ];D[l
++]-=10){D [l++]-=120;D[l]-=
110;while (!main(0,O,l))D[l]
+= 20; putchar((D[l]+1032)
/20 ) ;}putchar(10);}else{
c=o+ (D[I]+82)%10-(I>l/2)*
(D[I-l+I]+72)/10-9;D[I]+=I<0?0
:!(o=main(c/10,O,I-1))*((c+999
)%10-(D[I]+92)%10);}return o;}
or perhaps the following, which is a makefile, a C program, and a shell script all in one:
#include <stdio.h>
#define true
true /*:all
CC=cc
PROG=tomx
false :
make -f $0 $1
exit 0
all: $(PROG)
%:%.c
$(CC) $< -o $@
clean:
rm $(PROG)
.PHONY: /* true clean */
int main() {return!printf("Hello, world\n");}
(sorry for all the double-spacing; I don't know what's going on, but I'm on a Windows box with devil-carriage returns so that may be it)for((A..Z,a..z,"0".."9")){foreach$x(split//,$_){$e{$x}=scalar keys%e;}}
sub o{$o="";($s)=@_;for(n..p){$o=chr($s&255).$o;$s>>=8;}print$o;}
sub d{foreach$q(@_){if($b==4){o($s);$s=0;$b=0;}$s<<=6;$s+=$e{$q};$b++;}o($s);}
d(split(//,$$%2?"anVzdCBhbm90aGVyIHBlcmwgaGF0ZXIK":"aGFwcHkgYmlydGhkYXkgcGVybAo="));
also, my perl skills are seriously rusty, so this is nowhere near as bad as it could have been.(localtime)[3]=~/1?./;print(qw(0 st nd rd)[$&]or'th');For the suffixes, I think.
if ([pope shitsInWoods])switch(env.ShitLocation(g_thePope))
{
case env.WOODS:« Older iCruel: "Even if it does live it's not [a] life wo... | Here are the ten stories you p... Newer »
This thread has been archived and is closed to new comments
posted by Slack-a-gogo at 11:48 AM on December 18, 2007