Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

The Boy Scout Rule

by eyepopslikeamosquito (Bishop)
on Jan 25, 2015 at 09:59 UTC ( #1114424=perlmeditation: print w/replies, xml ) Need Help??

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 );
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://1114424]
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2021-04-19 04:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?