in reply to Re: Filling In "The Gaps" in an Array
in thread Filling In "The Gaps" in an Array

Man, my newbie-dom really manifested itself in the form of not being able to see the way you used operators as short hand. I went through my sources though and to put it in newbie terms: This...
'' ne $items[0] ? $buffer = $items[0] : $items[0] = $buffer;
...is the same as this...
if ('' ne $items[0]) { $buffer = $items[0] } else { $items[0] = $buffer }
right? I think this is going to work out nicely. Thank you all so much for the help. --- you can't be what you were...so you better start being just what you are....

Replies are listed 'Best First'.
Re^3: Filling In "The Gaps" in an Array
by particle (Vicar) on Dec 12, 2002 at 23:40 UTC

    your code example is correct. ?: is called the ternary operator. you can read about it in perlop

    ~Particle *accelerates*