in reply to Removing duplicates from list

davido has the best idea but if you want to use a regex you can use something like:
my $list = "RcvChar checkeof SerialOutputString SerialOutputString SerialOutputString GetFile ChksumByteByByte GetChksum SerialOutputString SerialOutputString"; while ($list =~ s/(\b\w+\b)(.*?)\s+\1\b/$1$2/s) {}; print $list;
outputs :
RcvChar checkeof SerialOutputString GetFile ChksumByteByByte GetChksum

--

flounder