my ($a, $b) = glob<>; print int($a / $b),'.'; $a %= $b; for (my $i = 0; $i < 50; ++$i) { $a *= 10; print int($a / $b); $a %= $b; }