in reply to Array Sorting
Please use <code> tags so that your script looks like a real script and '$array1' looks like '$array[1]'
Also you need to debug your program. That is relatively easy, just add a few print statements that tell you what array1 or array2 looks like
You often will see immediately where your program doesn't do what you want. For example you seem to first split for commas (quite sensible) and then afterwards for line endings (\n) which really doesn't make sense since you only read your file one line at a time.
|
|---|