Scanning all elements of an array in GAWK returns numbers instead of values
Given the following function:

    function process_pipes(text)
    {
        split(text,recs,"|");
        for (field in recs){
            printf ("|%s|\n", field)
        }
    }

If the input is: 0987654321|57300|ERROR account number not found|GDUMARESQ|0199|9|N|0||

Why do I get the numbers below instead of the text?

<pre>
|4|
|5|
|6|
|7|
|8|
|9|
|10|
|1|
|2|
|3|
</pre>

Scanning all elements of an array in GAWK returns numbers instead of values
===

Given the following function:

    function process_pipes(text)
    {
        split(text,recs,"|");
        for (field in recs){
            printf ("|%s|\n", field)
        }
    }

If the input is: 0987654321|57300|ERROR account number not found|GDUMARESQ|0199|9|N|0||

Why do I get the numbers below instead of the text?

<pre>
|4|
|5|
|6|
|7|
|8|
|9|
|10|
|1|
|2|
|3|
</pre>
