use HMTL::Parser; my $ca = "california.html"; open (my $f1, "<" , $ca) || die ("Can't open file : california.html"); while (<$f1>){ if (my $text =~ /Employee\sA.\d.\d.\d## the employee A/B/C is fixed. But for sometimes there will be no value between the tag.

Summary

Employee A-0.82
Employee B-5.02
Employee C19

Summary

Employee A
Employee B
Employee C