in reply to Removing a string-element from an array of strings
Here's one way:
$ perl -E 'my @x = qw{A B C D}; @x = grep $_ ne "B", @x; say "@x"' A C D
— Ken
|
---|
In Section
Seekers of Perl Wisdom
in reply to Removing a string-element from an array of strings
Here's one way:
$ perl -E 'my @x = qw{A B C D}; @x = grep $_ ne "B", @x; say "@x"' A C D
— Ken
|
---|