You also need to have the match in list context to have it return the captured substring: my ($f_name) = $name =~ m/.../(.*) [a-zA-Z]\.?\z/
And I think you mean to have (), not [], in the assignment to @names.
In reply to Re: Parsing out first names
by ysth
in thread Parsing out first names
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |