#!/usr/bin/perl -w open(EMPLOYEES,"employees") || die "Cannot Open"; while(){ if(/(..):(..):(..):(..):(..)/){ #Suppost to parse $_ $ID = $1; $DP = $2; $LN = $3; $FN = $4; $NM = $5;} print $ID; # print $DP; # print $LN; # So I can see if a value is there print $FN; # print $NM; # print $LN."\t".$FN."\t".$ID."\t".$NM; } } close(EMPLOYEES)