in reply to Removing recurring consecutive element
Hmmm... Sure you want to delete consecutive same elements? To me it seems you want the first word of each string.
If so what about:
my @str = map{ (split ' ', $_, 2)[0] } @{$tpl} ;
instead of your grep-line
This way you get the first element of each of your strings.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Removing recurring consecutive element
by neversaint (Deacon) on Oct 13, 2005 at 07:13 UTC | |
by monkfan (Curate) on Oct 13, 2005 at 07:22 UTC |