in reply to Logic Issues with conditionals
I'd cleanup your @files assignments via the use of a hash. Something like this:
my %files = ( dev => [qw(dev_file1 dev_file2 dev_file3 dev_file4)], prod => [qw(prod_file1 prod_file2 prod_file3 prod_file4)], report => [qw(report_file1 report_file2 report_file3 report_file4) +], ); my $files = $files{$access};
I might even extend it to be a dispatch table, but you haven't provided enough info to say if that would be a good approach in your case.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Logic Issues with conditionals
by jmneedhamco (Novice) on Mar 27, 2015 at 19:11 UTC | |
by fishmonger (Chaplain) on Mar 28, 2015 at 13:20 UTC |