in reply to Re^2: printing array using map
in thread printing array using map

In what way does oko1's solution not work for you?

Using your input of:

w1 w2 w3 [t4 w4] w5

produces:

w1 w2 w3 w4 t4 w5

using an elegance I'd be proud of. Is that not what you're after?


Unless I state otherwise, my code all runs with strict and warnings