you probably want a regexp more like
/^[_a-zA-Z][^.]{1,7}\.txt$/
This matches an underscore or letter (the {1} is unnecessary, char classes always match one char only, which is why you need modifiers like * or + to make it do something different)
Then you can do
while(<READFILE>) {
# something here
}
which will go through the file line by line putting the data in $_
I would read up on chomp and split and regular expressions on how to work with the data in the file.
P.S. put <code> tags around your code to make it display properly in a post.
- Ant
- Some of my
best work - (1 2 3)