in reply to Printing th entire line with a keyword
You could use the -n switch if you wanted a one line solution -
see perlrun for the full details.