Inverse of 'chop @array'

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • gusmeister

    Inverse of 'chop @array'

    '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ürgen Exner

    #2
    Re: Inverse of 'chop @array'

    "gusmeister " <gusmeister_NOS PAM_@sympatico. ca> wrote in message
    news:ho92c.1052 1$jw2.679271@ne ws20.bellglobal .com...[color=blue]
    > 'chop @array' removes the last character for each element in an array. If[/color]
    I[color=blue]
    > want to do the inverse and append a character to each element, how would I
    > do that (without using a 'foreach' loop)?[/color]

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

    jue


    Comment

    Working...