The final \s* is meaningless here; it will always be true.if(/^([A-Z]+)\s*/)
Also, based on the data set, he may want to use whitespace in his hash keys. How about this?
I decided to make sure that the first character is uppercase, but allow whitespace after that.if (/^([A-Z][A-Z\s]*)/)
buckaduck
In reply to Re: Re: Parsing a Text File
by buckaduck
in thread Parsing a Text File
by Perl Newby
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |