in reply to Extracting names from string
You would use regular expressions. (Please read this as: you didn't provide your attempts, just your restrictions. As far as we can tell, this is a homework assignment.)
$string =~ m:|(\w+)\.(\w+):; $extracted = "$2 $1";
(No, that's not quite what you're after, but it should be close enough that you can work from here - if you have more problems, please come back.)
|
|---|