my @shouldexist= qw( ismissing ismissing2 isthere isthere2 ); my @doexist= qw( isthere isthere2 istoomuch istoomuch2 ); my %missing, %toomuch; @missing{@shouldexist}=(); # now all files that should exist have an entry delete @missing{@doexist}; # now all that do exist don't have an entry anymore # now the same the other way round to find superfluous files @toomuch{@doexist}=(); delete @toomuch{@shouldexist}; print "Missing: ",join(' ',keys %missing),$/; print "Toomuch: ",join(' ',keys %toomuch),$/;
In reply to Re: Delete from array
by Skeeve
in thread Delete from array
by Smaug
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |