Inverse of 'chop @array'

G

gusmeister

'chop @array' removes the last character for each element in an array. If I
want to do the inverse and append a character to each element, how would I
do that (without using a 'foreach' loop)?
 
J

Jürgen Exner

gusmeister said:
'chop @array' removes the last character for each element in an array. If I
want to do the inverse and append a character to each element, how would I
do that (without using a 'foreach' loop)?

You could use map instead, but that would just hide the loop inside of it's
own logic.

jue
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top