M
Me
I have an array of hash with the contains some of the following data:
Direction
Name
Usage
Day
Month
Year
Protocol
From this, I need to get an array of a"Usage" data for a given
"Protocol" for a x number of "Day"(s), two direcions.
Protocol1 = [45, 67 ,87, 76, 75] : Would be usage for
5 day for "Protocol1".
Snippet of what I have so far:
################
foreach my $p(@$protocols) {
foreach my $c ($day1..$day2) {
foreach my $ref (@usage) { #the array with the data
my $day = $ref->{Day};
if ($day == $) {
push(@in_proto,$ref->{Usage})
if ($ref->{direction} eq "In");
push(@out_proto,$ref->{Usage})
if ($ref->{direction} eq "Out");
}
}
}
}
################
Am I going in the right direction?
Direction
Name
Usage
Day
Month
Year
Protocol
From this, I need to get an array of a"Usage" data for a given
"Protocol" for a x number of "Day"(s), two direcions.
Protocol1 = [45, 67 ,87, 76, 75] : Would be usage for
5 day for "Protocol1".
Snippet of what I have so far:
################
foreach my $p(@$protocols) {
foreach my $c ($day1..$day2) {
foreach my $ref (@usage) { #the array with the data
my $day = $ref->{Day};
if ($day == $) {
push(@in_proto,$ref->{Usage})
if ($ref->{direction} eq "In");
push(@out_proto,$ref->{Usage})
if ($ref->{direction} eq "Out");
}
}
}
}
################
Am I going in the right direction?