#!/usr/bin/perl use warnings; use strict; $|++; my $pounds = 175; my $the_years_go_by = 1; while($the_years_go_by){ foreach (1 .. 365){ my $pizza = int rand(1000); my $ice_cream = int rand(1000); my $beer = int rand(1000); my $longwalks = int rand(500); my $bikerides = int rand(500); my $tai_chi = int rand(500); select($pizza,$ice_cream,$beer,.01); select($longwalks,$bikerides,$tai_chi,.01); $pounds += ( $pizza + $ice_cream + $beer - $longwalks - $bikerides - $tai_chi) / 5000; print "\rscale->$pounds"; if($pounds > 250){goto OBcity} if($the_years_go_by > 100){goto END} $the_years_go_by += 1/365; } } END: print "\nIt don't matter anymore\n"; exit; OBcity: print "\nWelcome to OBcity, where sex costs money. :-) \n"; exit;