
AlphaScorpious
Novice
Oct 5, 2013, 2:17 PM
Post #5 of 5
(3013 views)
|
Re: [BillKSmith] Data Sorting Example
[In reply to]
|
Can't Post
|
|
Please try the code below and compare the result with yours That worked, thank you.
Well, if you want to sort all the positive integers from 1 to 50,000, just don't sort them and don't even look at your database. Just print them in their natural order: Thanks, but the exercise is to emulate a database so I'm pulling out a section of the numbers from 1 to 50,000 and then giving the user the option to do things like display only prime numbers, or exclude numbers starting with 3 or ending with 8, etc.
Do not assume that the user has entered the right data, validate it. I recommend the use of a module for prompting. Thanks, but I'm just starting with Perl so I'll wait to add modules until I understand enough of the basics.
(This post was edited by AlphaScorpious on Oct 5, 2013, 2:19 PM)
|