in reply to Extracting names from string
my @strings = ("s005219/Doe John|John.Doe\"", "s0052194/Doe Thomas|Tho +mas.Doe\""); my @names; # will hold the finished list of names foreach my $string (@strings) { my (undef, $tmp_string) = split('\/', $string); my ($name, undef) = split('\|', $tmp_string); push (@names, $name); }
|
|---|