sub Prioritise_requests { my ($input_directory) = @_; my $input_directory_lowest = $input_directory."1"; my $input_directory_highest = $input_directory."2"; readdir (LOWEST, "<$input_directory_lowest") or die "Error opening d +irectory: $!"; readdir (HIGHEST, "<$input_directory_highest") or die "Error opening + directory: $!"; my @lowest_priority = <LOWEST>; my $request_of_interest = 'none'; foreach (@lowest_priority){ # foreach low priority request my @highest_priority = <HIGHEST>; # fill high_priority array if (@highest_priority) { # If there are elements in the array #Do nothing } else { $request_of_interest = $_; } if (@highest_priority) { foreach (@highest_priority){ # foreach high priority request $request_of_interest = $_; return $request_of_interest; } } return $request_of_interest; } }
In reply to Re^4: Question mark regarding: my @lowest_priority = <LOWEST>;
by Win
in thread Question mark regarding: my @lowest_priority = <LOWEST>;
by Win
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |