Programming Comparisons: primes-up-to


Problem: give the smallest possible complete subroutine/function/method definition in a language of your choice which, when called with a number, returns a list (in whatever way your given language can return a list) of the prime numbers lesser than or equal to that number. Each entry is preceded by a commented example of how to call it with the argument: 99 followed by a newline. (The character count includes the call to avoid cheating :-)

APL: 27 ⍝F 99 F R (~R∈R∘.×R)/R←1↓ιR
perl: 46 #f(99) sub f{grep{(1x$_)!~/^(11+)\1+$/}2..pop}
haskell: 46 --f 99 f n=[x|x<-[2..n],all((0<).mod x).f$x-1]
ruby: 56 #f 99 def f(n)(2..n).reject{|i|f(i-1).find{|j|i%j<1}}end
false: 59 {99f;!} [$[1-$][\$@$@$@$@\/*=[1-$$[%\1-$@]?~[\$@]?]?]#%%]f:
nvi: 60 "99g map g iPYpwX##2^V^[bd(x@1dk:g/^\(###*\)\1\1*\</d^V :%s/#*^V
python: 74 #f(99) f=lambda n:[i for i in range(2,n+1)if 0not in[i%j for j in f(i-1)]]
C: 74 //int a[99];f(99,a);a p(n,a)int*a;{for(*a=1;n%++*a||(a+=--n<*a,*a=!!n););}
PHP: 82 #f(99) function f($n){for($i=$n;--$i;)if(!($n%$i))--$i?$i=--$n:$a[]=$n;return $a;}
ocaml: 94 (*f(ref[])99*) let f a n=for i=2to n do if List.for_all(fun x->i/x*x<i)!a then a:=i::!a done;a
lisp: 96 ;(p nil 99) (defun p(a n)(dotimes(i n)(or(< i 2)(some #'(lambda(x)(=(mod i x)0))a)(push i a)))a)
prolog: 100 %p(5,X). r(_,[]).r(X,[Y|Z]):-X mod Y>0,r(X,Z).p(2,[2]).p(N,U):-M is N-1,p(M,L),(r(N,L),[N|L]=U;L=U).
befunge: 102 v>-:!v >15g1-v 01 v _:15p\:05p\%!|v1g50_05g:1v &^< ;#g51g50<>-:>#;<-1g5< >:^>$$>:#._@
scheme: 116 ;(p nil 99) (define(p a n)(do((i 2(+ i 1)))((= i n))(if(for-all? a(lambda(x)(=(modulo i x)0)))(set! a(cons i a))))a)
postscript: 125 %99 f /f{/n exch def 2 1 n{/i exch def/t 0 def 2 1 i 1 sub{/j exch def i j mod 0 eq{/t t 1 add def}if}for t 0 eq{i}if}for}def