so you can simply do%shouldexist = ( 'filename1' => 1, .. 'filenamen' => 1 ); #or just %shouldexist = map {$_ => 1} @shouldexist;
if you whant to do the same using an array you have to scan @shouldexist on each iteration and delete when match (slower)for(@doexist) { delete $shouldexist{$_}; }
In reply to Re: Delete from array
by cianoz
in thread Delete from array
by Smaug
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |