deleting record file

if in my file consist with record like this :

AAA1234567
BBB3314134
AAA1232134
CCC1231232
DDD0980980
AAA8098090

And I want to delete record
which substring(record,1,3)="AAA".

Is it possible to do that (deleting specific record) by unix shell script or perl without coding any high level language (like C or java).
if it is possible, what is the command/ statement ?

thank's for your kind answer.

There are several ways to do it in shell scripts and more in perl. If you want to get rid of all lines that have AAA in them, this will work.

cat file | grep -v "AAA" > file2
mv file2 file

If you are looking for a different result, read the man page on sed.