use strict; use warnings; for (-4, 1, 7, 12, 89, 54, 13, 104) { if ($_ < 1 || $_ > 64) { print "$_ outside.\n" } elsif ($_ <= 8) { print "$_ 1-8\n"; } elsif ($_ <= 16) { print "$_ 9-16\n"; } elsif ($_ <= 32) { print "$_ 17-32\n"; } elsif ($_ <= 64) { print "$_ 33-64\n"; } }