my $config = <<'GROK';
ADD UDP_LISTENER ( 515 )
ADD UDP_LISTENER ( 616, 657 )
ADD UDP_LISTENER ( 987 )
GROK
my @test_cases = (
{ desc => "# Test 1",
conf => $config,
find => [ 'port = 515', 'port = 616', 'port = 657', 'port = 987' ],
},
);
####
my $liststr = 'ADD UDP_LISTENER';
my @ports = ( 515, 616, 657, 987 );
my $config = <<"GROK";
$liststr ( $ports[0] )
$liststr ( $ports[1], $ports[2] )
$liststr ( $ports[3] )
GROK
my @test_cases = (
{ desc => "# Test 1",
conf => $config,
find => [ map { "port = $_" } @ports ],
},
);
##
##
my $value = [ $x => $y ] -> [ $y <= $x ];
##
##
my $value = $x < $y ? $x : $y;
##
##
use List::Util qw(min);
my $value = min( $x, $y );