use strict; use warnings; my $strng = "hello hello the beatle said said to his fans"; my @words = $strng =~ /\G(\w+ ?)\1*/g; print join "*", @words; # hello *the *beatle *said *to *his *fans
In reply to Re: removing repeats
by holli
in thread removing repeats
by dummy2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |