Re: matching pattern & printing

2005-08-17 Thread Manav Mathur
> Hi: > > In the following perl script, I would like to print all the lines in a file > (mdout_short.txt) to temp.txt which have "NSTEP" as a word: > > > use strict; > use warnings; > > my $mdout_file = "mdout_short.txt"; > > my $mdout_xtemp_file =

RE: matching pattern & printing

2005-08-17 Thread Bedanta Bordoloi, Gurgaon
Hello, You can simply say while (){ if ($_ =~ /NSTEP/){ print OUT $_; } } Bedanta -Original Message- From: Vineet Pande [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 17, 2005 4:24 PM To: beginners@perl.org Subject: matching pattern & printing

Re: matching pattern & printing

2005-08-17 Thread John W. Krahn
Vineet Pande wrote: > Hi: Hello, > In the following perl script, I would like to print all the lines in a > file (mdout_short.txt) to temp.txt which have "NSTEP" as a word: > > > use strict; > use warnings; > > my $mdout_file = "mdout_short.txt";

Re: matching pattern & printing

2005-08-17 Thread John Doe
Vineet Pande am Mittwoch, 17. August 2005 12.53: > Hi: > > In the following perl script, I would like to print all the lines in a file > (mdout_short.txt) to temp.txt which have "NSTEP" as a word: > > > use strict; > use warnings; > > my $mdout_file

matching pattern & printing

2005-08-17 Thread Vineet Pande
Hi: In the following perl script, I would like to print all the lines in a file (mdout_short.txt) to temp.txt which have "NSTEP" as a word: use strict; use warnings; my $mdout_file = "mdout_short.txt"; my $mdout_xtemp_file = "temp.txt"; open