Ramprasad A Padmanabhan wrote:
Quick question,
I want to run
perl -ane '/REMARKS/ && print $F[1]' FILE1 FILE2
the problem is that there is no newline at the end of the every print.
so I have to do
perl -ane '/REMARKS/ && print $F[1] . "\n"' FILE1 FILE2
I thought there is a switch in perl by which I could auto print newlines
I am not able to find any ?
Yes there is one, the -l switch.
perl -lane '/REMARKS/&&print$F[1]' FILE1 FILE2
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>