hello,
I'm excluding files form being added to an array but i'm not pleased with the way I made it work.
Could you help me find a better (shorter?) piece of code?
foreach $temp_file (@ls) {
#next is bad
$add = "y";
foreach $notthisfile (@excludefiles) {
if ($temp_file eq $notthisfile) { $add = "n"; }
}
if ($add = "y" {
...
}
#previous is bad
}
I'm excluding files form being added to an array but i'm not pleased with the way I made it work.
Could you help me find a better (shorter?) piece of code?
foreach $temp_file (@ls) {
#next is bad
$add = "y";
foreach $notthisfile (@excludefiles) {
if ($temp_file eq $notthisfile) { $add = "n"; }
}
if ($add = "y" {
...
}
#previous is bad
}