Hi Miller,
I have just changed my $infile = test This is my test.csv file I am getting the following error :-
Bareword "test" not allowed while "strict subs" in use at check.pl line 7.
Execution of check.pl aborted due to compliations errors.
If you got that error, then maybe you did something "wrong"? Maybe? Dude, I gave you all the code that you could possible need for this. I can't teach you perl over the forums, nor translate all the ways that you can screw up the code that I gave you into meaningful error messages.
Nevertheless, this one time. ok.
Bareword "test" not allowed at line 7. Hrmmm.... It's telling us that there is a problem at line 7. Wait! You changed something at line 7. What was it that we changed? Oh, that's right we added the word test. Oh, and look here, the error even says says bareword "test" not allowed? Maybe that was bad. Well golly shucks, maybe I should include any string in quotes?
my $infile = "test";
There, now the code will look for some input file named "test". Alternatively, you could just leave the code alone and input the filename from the command prompt.
perl check.pl test
Either way it would help if you took the time to learn at least an rudimentary understanding of perl before asking questions. There are no ignorant questions, just ignorant questioners. :)
QED