I am sure that there is a more elegant way of doing it, but this works.sub get_alphb_fr_tpl { my $aref = shift; my @str = grep (!/[\d+\s+]/,map{ split " ",$_} @{$tpl}) ; my $lst = ''; my @out; for(@str){ $out[@out] = $_ unless $lst eq $_; $lst = $_; } print Dumper \@out ; return; }
In reply to Re: Removing recurring consecutive element
by neosamuri
in thread Removing recurring consecutive element
by neversaint
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |