in reply to Perl Number range lookup question
my $x = 40;
print int( ( $x % 50 ) / 10 );
This exactly was the first thing I wrote, but I decided I'd not do it that way because "tiers" are usually things that get changed sooner or later and I thought the OP code might just be a contrived example.
1. Keep it simple
2. Just remember to pull out 3 in the morning
3. A good puzzle will wake me up
Many. I like to torture myself
0. Socks just get in the way
Results (302 votes). Check out past polls.