Jeremywhile(<FILE>) { @line = split '|'; # split line $firstLetter = substr $line[1], 0, 1; #grab first letter $lastName = (split(' ', $line[1]))[1]; #split the name entry on wh +itespace and grab the last name portion $name = $firstLetter . ". " . $lastName; #concatenate with period +after first letter }
In reply to Re: Parsing Names in a Text File
by enoch
in thread Parsing Names in a Text File
by Perl Newby
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |