eval 'exec perl -S -i~ $0 ${1+"$@"}'
     if $running_under_some_shell;

# Option -i~   

# Loop over all lines looking for duplicate entries and just retaining
# the first one

LINE: while (<>) {
    if (/^\s*(\S+)/) {
	# See if this entry is already present
	next LINE if ($included{$1});
	$included{$1} = 1;
    }
    print;
}
