James Parsons wrote:
> Hi all
>
> Since I'm new to perl, I'm not sure how to tackle   this type of problem
>
> a. I have file with the following in it
> 100
> 101
> 102
> 103
>
> b. How would check if these numbers are in correct  sequence
> c And  they are not  sequence kick out an error message.

Have a try. Can you:

- Read the data into Perl?
- Use an array variable?
- Sort a list?
- Execute a loop, processing each element of a list?

If you know enough to put these together, then I suggest
you compare the original list of numbers with same list
after sorting. If they are the same then your list was in
order.

The alternative is to look through your list to see if any
number is less than the one before it. You'll still need
most of the above skills though.

Let us know where we can help.

Rob





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to