That is not a good way to process files. However the problem is that you used ls -l and assumed to always find 2 fields, on the first line of ls -l you will only have one field.
One better way would be:
Code:
for file in * ; do
case $file in
*.88)
do something;;
*.99)
do something else;;
esac
done