in reply to simpler regex
If that's what is being passed to the funcion, then it would be much simpler to add periods as needed before joining the parts together:
sub fullname { my @parts = @_; for ( @parts ) { $_ .= '.' if ( /^[A-Z]$/ ); } return join " ", @parts; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: simpler regex
by rsiedl (Friar) on May 16, 2007 at 03:36 UTC | |
by graff (Chancellor) on May 16, 2007 at 05:16 UTC |