in reply to Re: Strip data from end of an element of an array
in thread Strip data from end of an element of an array

$line[4].="alias: $1, $line[0]\"";

Both your and Roger's example snippets modify the 5th element. The original question said, "I need to manipulate the contents of the forth element to contain what i want." The 4th element's index is, of course, 3, not 4 (assuming nobody tinkered with  $[).


Dave


"If I had my life to live over again, I'd be a plumber." -- Albert Einstein

Replies are listed 'Best First'.
Re: Re: Re: Strip data from end of an element of an array
by Roger (Parson) on Nov 14, 2003 at 23:56 UTC
    Hi Davido, I agree with you that I am modifying the 5th element. But from what I read in the original post, I think he actually meant the 5th element when he said the 4th element (index of 4, but the index starts from 0). I confirmed this by counting the number of elements in the data, and found that the 5th element was indeed what he refers to. :-)