while ( looping through file ){ check to see if line starts with "From" # hint: use regex ^ , or use index() ; see perldoc -f index if ( it starts with "From" ) { split the line on space # hint : perldoc -f split get the second element of the array output by split() print it out exit }

}

in short if you want to program in Perl, all you have to do is RTFM: 1) perldoc -f split 2) perldoc -f index 3) perldoc perlre