http://qs321.pair.com?node_id=11119842


in reply to Re^2: Removing a string-element from an array of strings
in thread Removing a string-element from an array of strings

Here's another approach if you're looking for an exact string match for one of multiple choices:

c:\@Work\Perl\monks>perl -wMstrict -le "use List::MoreUtils qw(part); ;; my @history = qw(Foo::End(3) dhcp-options(5) Back_word(3) audit-packa +ges(8)); print qq{before: (@history)}; ;; my %choices = map { $_ => 1 } qw(Back_word(3) Foo::End(3)); ;; @history = map @$_, part { exists $choices{$_} } @history; print qq{after: (@history)}; " before: (Foo::End(3) dhcp-options(5) Back_word(3) audit-packages(8)) after: (dhcp-options(5) audit-packages(8) Foo::End(3) Back_word(3))


Give a man a fish:  <%-{-{-{-<