in reply to condensing code

And a C-way to do it..
#!/usr/bin/perl -w use strict; my $t= -181; for (my ($i,$j) = (30,1); $i <= 180; $i += 30, $j++) { if ($t <= $i) { print $j; last; } }

The div by 30 is much more straight forward tho'!