sorting doubt

HI,
I would like to know if there if any sorting command which uniquifies the list but does not arrange in alphabetical order.
ex- I have
b
b
a
b

Output I want is :
b
a

I am trying sort -u and this does the sorting in alphabetical order.

Please help friends

Are you open to awk ? If so, try

awk '!x[$1]++' list.txt

It is not working for me. Is that an unix xommand ?
Any other suggestion?

Yes:

perl -ne'print unless $_{$_}++'

Could you clarify what's wrong with the awk solution?

thanks !!

when I used that command i got an error as : x[: Event not found.
perhaps i am using it wrongly, its new to me ..

The problem is that you're using a C shell, try running the command from another shell.