Remove an array from another array in perl
https://stackoverflow.com/questions/30889482/remove-elements-in-one-array-from-another-array-in-perl
To filter an array, you can use grep:
my @nonlinks = grep { my $f = $_;
! grep $_ eq $f, @symbolic_files_found }
@files_found;
But it's usually cleaner to use a hash.
my %files;
@files{ @files_found } = (); # All files are the keys.
delete @files{ @symbolic_files_found }; # Remove the links.
my @nonlinks = keys %files;
好的心态+正确的方法
浙公网安备 33010602011771号