Just another Perl shrine | |
PerlMonks |
Re: Using array elements for a file searchby onelesd (Pilgrim) |
on Oct 24, 2011 at 20:07 UTC ( [id://933472]=note: print w/replies, xml ) | Need Help?? |
Code review aside, your example is interesting because you seem to be trying to capture every line of your input file and write it to another file (which can be done in a simpler way than this). The output to STDOUT looks like it does because you read $INFILE to the end when you checked for the letter "A", so the next time you try to while <$INFILE> {...} for letter "B" the pointer is already at EOF and the while <$INFILE> {...} isn't entered.
In Section
Seekers of Perl Wisdom
|
|