> 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 =
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
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";
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
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