"be consistent" | |
PerlMonks |
In-place file filteringby princepawn (Parson) |
on Jul 24, 2003 at 19:23 UTC ( [id://277660]=perlquestion: print w/replies, xml ) | Need Help?? |
princepawn has asked for the wisdom of the Perl Monks concerning the following question:
I have a series of tab-separated files which look like this:
Because the second field represents a zip code, I want to kill any lines in a file which do not conform to zip code requirements. However, my perl one-liner attempts are failing. How can I get this one-liner to change the file so that only lines which match my filter stay? Here is my attempt:
Carter's compass: I know I'm on the right track when by deleting something, I'm adding functionality
edited by ybiC: balanced <readmore> tags
Back to
Seekers of Perl Wisdom
|
|