Enumerate all palindromic numbers (in decimal) between 0 and n
Perl 5.10, 29 (or 39) characters
say for grep$_==reverse,0..<>
Needs the say
feature enabled. 29 chars if you consider that to be free, otherwise 39 to add use 5.010;
. Argument on STDIN.
Perl, 35 characters
#!perl -l
print for grep $_==reverse,0..<>
using the old perlgolf convention that #!perl
is not counted but any flags following it are.
Perl, 36 characters
print$_,$/for grep $_==reverse,0..<>
If none of the others qualify.
Befunge 320 313 303 characters
(including significant newlines and whitespace)
&:#v_v# # :-1<
v91:< v <
0 >0.@ >\25**\1-:#^_v
pv p09+1g09<^_ >$+ v
:>:25*%\25*/:| ^:p18:+1g18\<
: > >90g 1-:90p | > ^
>| $^ < >-| ^ #<
@ > 0 81p^ >:.25*,^
^ <
I wonder if I could make this smaller by rerouting the paths...
Edit: redid the top part to avoid an extra line.
Perl 5.10 - 27 characters
map{say if$_==reverse}0..<>
Reads the argument from stdin.