http://www.perlmonks.org?node_id=976723


in reply to Perl Number range lookup question

my $x = 40; print int( ( $x % 50 ) / 10 );