and i have an array that contains a bunch of paths:my $path = "C:/temp/stuff";
What is the best way to see if @directories contains $path? The way i'm trying to do it now is:open (PATH, "c:/logs/paths.txt"); my @directories = <PATH>; close (PATH);
foreach (@directories) { if ($path eq $_) { stuff } }
In reply to searching an array? by Whitchman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |