We don't bite newbies here... much PerlMonks

### comment on

 Need Help??

You need to make your sorts numeric.

```[10:09:10.72] P:\test>copy con junk.pl
use strict;
use warnings;
sub stringify { \$_[0]->() };

sub make_sub {
my (\$N) = ( my @f = sort @_ );
return bless sub{ for(;;\$N++){ \$N % \$_ || return \$N++ for @f }  };
}

@ARGV=(2,3,5) unless @ARGV;
@ARGV=sort @ARGV;

{
local \$"=", ";
local \$\="\n";
print "Factors: @ARGV";

foreach  (@ARGV) {
my \$f=make_sub(\$_);
print "F(\$_) = @{[(\$f) x 25]}";
}
my \$o=make_sub(@ARGV);
print "R(@ARGV) = @{[(\$o) x 25]}";
print "----";
}
^Z
1 file(s) copied.

[10:09:30.92] P:\test>junk 3 22 111
Factors: 111, 22, 3
F(111) = 111, 222, 333, 444, 555, 666, 777, 888, 999, 1110, 1221, 1332
+, 1443, 1554, 1665, 1776, 1887, 1998, 2109, 2220, 2331, 2442, 2553, 2
+664, 2775
F(22) = 22, 44, 66, 88, 110, 132, 154, 176, 198, 220, 242, 264, 286, 3
+08, 330, 352, 374, 396, 418, 440, 462, 484, 506, 528, 550
F(3) = 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51
+, 54, 57, 60, 63, 66, 69, 72, 75
R(111, 22, 3) = 111, 114, 117, 120, 123, 126, 129, 132, 135, 138, 141,
+ 144, 147, 150, 153, 154, 156, 159, 162, 165, 168, 171, 174, 176, 177
----

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco.
Rule 1 has a caveat! -- Who broke the cabal?

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

• Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
• Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
• Read Where should I post X? if you're not absolutely sure you're posting in the right place.
• Posts may use any of the Perl Monks Approved HTML tags:
a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
• You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
 For: Use: & & < < > > [ [ ] ]
• Link using PerlMonks shortcuts! What shortcuts can I use for linking?

Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2020-02-24 21:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
What numbers are you going to focus on primarily in 2020?

Results (107 votes). Check out past polls.

Notices?