XP is just a number | |
PerlMonks |
Even and uneven numbers as RegExby New Novice (Sexton) |
on Sep 27, 2004 at 11:24 UTC ( [id://394120]=perlquestion: print w/replies, xml ) | Need Help?? |
New Novice has asked for the wisdom of the Perl Monks concerning the following question:
Dear Perlmonks,
I have a file (using new line as a delimiter) that is at the moment storing each kind of information twice. Naturally, I would like to get rid of all duplicates. They come in bundles, so I was thinking of just reading out every second line using a loop and storing this in a new file. My questions: 1. Is there a regular expression for "even number"/"uneven number"? 2. What is the code for "end of file"? 3. Is there a module that could do it (although I prefer to keep things simple)?
Thanks!
Back to
Seekers of Perl Wisdom
|
|