Help for this page

Select Code to Download


  1. or download this
    my $config = <<'GROK';
    ADD UDP_LISTENER ( 515 )
    ...
          find => [ 'port = 515', 'port = 616', 'port = 657', 'port = 987'
    + ],
       },
    );
    
  2. or download this
    my $liststr = 'ADD UDP_LISTENER';
    my @ports   = ( 515, 616, 657, 987 );
    ...
          find => [ map { "port = $_" } @ports ],
       },
    );
    
  3. or download this
    my $value = [ $x => $y ] -> [ $y <= $x ];
    
  4. or download this
    my $value = $x < $y ? $x : $y;
    
  5. or download this
    use List::Util qw(min);
    my $value = min( $x, $y );