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 }
-- vek --

Replies are listed 'Best First'.
Re: Re: Removing duplicates from list
by Levan (Novice) on Oct 16, 2003 at 02:00 UTC
    hi,
    actually the codes that i have put up is a shorter version of what i actually had. Cos i think the codes are a bit too long and complicated to be put up on this thread, so i shorted it. thanks for the advice!!!
    Levan