#!/perl
# znecheva@mail.pratt.lib.md.us
# Hi everyone,
# How can I extract the text before the first occurrence of dot (.) or 
# single space  from the first field.
#


$infile = "zary_necheva_data.txt";

open(INFILE, $infile) or die "Death $!";

while( $line = <INFILE> ){

$lpos = index($line,"|");

$first = substr($line, 0, 5);
$first =~ s/\.+//;
$last = substr($line, $lpos);

print $first.$last;

}


