Set boundaries for input w/sort
$ perl -wle 'my ($min, $max) = (1,100); print ((sort { $a <=> $b } ($min, $max, $_))[1]) for (-10,10,200)'
Written by Nicolas Mendoza
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Perl
Authors
janosgyerik
25.11K
Jean-Remy Duboc
12.22K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#