I am trying to count all the definite articles and indefinite articles. And change "the"=>"THE", "a"=>"A", "an"=>"AN".
Obviously, a lot of errors in my codes.
Hopfully, to get help
perl test.pl test.txt
use English;
my $def_count; # the number of definite articles
my $indef_count; #the number of indefinite articles
sub count {
if ( $ARG[0] =~ /the/) #count as true if the lowercase version of the only argument of count is equal to "the"
else  {
return /uc($ARG[0])/; # return the uppercase version of the only argument of count.
while (<>) {
#output the line here,but how to do it
print "\nThere were $def_count definite articles\n",
"and $indef_count indefinite articles in the text.\n";