if ( $rec =~ m/$pattern/i ) SYNTAX is $scalar =~/regex/option so $rec is the $scalar, $pattern is the regex, and i is the option. The i option means ignore case. $someString = "uni panthers volleyball rules!"; $someString =~ m/UNI/ would NOT find a match, because it is a case sensitive search for the pattern. $someString =~ m/UNI/i would find a match, as the i option means the search will ignore case and treat uni, Uni, uNi, unI, UNi, UnI, uNI and UNI all the same, matching any one of the 8 possible ways.
perl moviesSearch.p muchado.txt
man cat cat -vTn moviestabsplit.txt | more Here is another example, with a tiny file named junk to demo [jacobson@math-cs 088]$ cat -n junk 1 here is a tab and another one 2 3 three tabs here bye 4 two tabs here yes 5 6 bye [jacobson@math-cs 088]$ cat -vETn junk 1 here is a tab^Iand another^Ione$ 2 $ 3 three tabs here^I^I^I bye$ 4 two tabs here^I^Iyes$ 5 $ 6 bye$