in reply to Converting pascal code to perl
sub roll { ((0,0,1,2,3,4,5,6,5,4,3,2,1)[shift]||0)/36 or warn "invalid roll" and 0; } [download]