- or download this
use strict;
use warnings;
...
.....
Last Name
.....
- or download this
my $fCnt = $fileText =~ /First\sName/g;
die qq{"First Name" occurs more than once\n}
...
my $lCnt = $fileText =~ /Last\sName/g;
die qq{"Last Name" occurs more than once\n}
if $lCnt > 1;
- or download this
my @fCnt = $fileText =~ /First\sName/g;
die qq{"First Name" occurs more than once\n}
...
my @lCnt = $fileText =~ /Last\sName/g;
die qq{"Last Name" occurs more than once\n}
if @lCnt > 1;