in reply to Removing duplicates from list
You've received some good suggestions from other monks so I just had a couple of comments about your code.
open (Mer, "Extracted.c");
Always try and get in the habit of checking the return value of open:
open (MER, "Extracted.c") || die "open: Extracted.c - $!\n";
Your for looks a little out of place for processing each line in the file. I dunno, whatever floats your boat I suppose but I think you'll probably see most people use a while loop:
while (<MER>) { # do stuff }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Removing duplicates from list
by Levan (Novice) on Oct 16, 2003 at 02:00 UTC |