I have a perl script that I want to take 2 options just like Unix grep
-v negates the match; print only lines that do not match the regex
-i makes it case sensitive; match regardless of case
Either or both options can be present or not, in any order, but if present, must occur before the rest of the arguments.
For example: .
/reg_grep2.pl -v perl ./*.pl
or ./reg_grep2.pl -i -v Test ./*.test.
I have tried the attached script, however it is not working properly.
Can anyone give me the correct script or modify existing one to make it work.