http://qs321.pair.com?node_id=88803


in reply to Parsing Names in a Text File

Check Name Parsing from early this yeat for more on this subject. It will give more cases to think about.

update:
I just looked at your strings a bit more closely.
Why don't you split on the "|" and get the second value?

($something, $name, $junk) = split(/\|/, $line, 3);
There are better ways of writing that split, but I'm running on no sleep.

update on update: looks like more people gave the split answer while I did that...