#!/usr/bin/perl

use warnings;
use strict;

use experimental qw(signatures);

sub inRange($toTest,@bounds){ # return 1/true if argument in range,
        #undef if not

    if ($toTest >= $bounds[0] and $toTest <= $bounds[1]) {
        return 1; #true/OK
    }
    else {return undef} #the block may be all on the line
}

my @limits = (1,500);
if (inRange(123,@limits)) { #the sub expects 2 arguments
    print "It is in range\n";
}
