sub quant{ int((shift)*8) } for ( 1 .. 9 ) { print "$_ => ", quant( ($_/9) - 0.0001 ), "\n"; }