perl -le'foreach ( <*.txt> ) { print if /^M[A-Z]{3}/ }'