#! /usr/bin/perl use strict ; use warnings ; use Data::Dumper ; $|++ ; my @array1 = qw( tmp0.size tmp0.buffersize tmp0.value tmp1.size tmp1.buffersize tmp1.value ) ; my @array2 = qw( size buffersize ) ; my $exclusion_str = join '|', @array2 ; my @result = map { join '.', @$_ } grep { $_->[0] eq 'tmp0' || $_->[1] !~ m/\b$exclusion_str +\b/ } map { [ split /\./, $_ ] } @array1 ; print Dumper( \@result ) ; exit ;
Those who know that they are profound strive for clarity. Those who
would like to seem profound to the crowd strive for obscurity.
--Friedrich Nietzsche
In reply to Re: Partial Array Comparision
by DamnDirtyApe
in thread Partial Array Comparision
by johnirl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |