in reply to Finding all divisors of an integer
#!/usr/bin/perl use strict; use warnings; chomp(my $is = shift); for (1 .. $is) { print "$_ " if ($is % $_ == 0); } print "\n"; [download]