raj wrote: > Hello All, > I am new to perl. I want to display the lines which > have "Testing" word. I have to do this in command line. > > I tried the with following options. Its not work what I expected. It > dispalys all lines. > > perl -p -e 'print if /Testing/m' test.txt
-p should be changed to -n. Also, you don't need the /m modifier on the regex. see perldoc perlrun for explanation of -p and -n. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>