in reply to A memory problem?
To capture a match in $1, you need to stick it between ()s; your regexp should be:
/^([a-zA-Z]+)$/ [download]
the lowliest monk