|
-
Oct 16th, 2001, 11:03 AM
#1
Thread Starter
Addicted Member
error in my perl code
I have the following code:
while (<INFILE> ) {
print OUTFILE;
}
The above code reads every line in my INFILE and writes it to the OUTFILE and works fine, but when I change it to the following it doesn't write anything to my OUTFILE ?
while (<INFILE> ) {
if ($_ eq "yes") {
print "$_";
print OUTFILE;
}
}
I only want to write those records to my outfile where the record ($_) = yes.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|