Dear Ronald,

Thanks for the quick reply!

>
>You don't show the most relevant portion of the code, which is printing the
>array.  I suspect it looks something like this:
>
>print "@fruit";


You were right!

>
>When you interpolate an array inside a double-quoted string, the elements
>are joined together with the value of the special variable $", i.e.:
>
>"@fruit" eq join($", @fruit)
>
>$" is space by default.  So, the spaces are not being added when you read
>in the array.  In fact, there are no spaces in the array, which is why you
>were unable to test for them or remove them.  The spaces are being added
>when you print the array.
>
>Try this instead:
>
>print @fruit;


You were right again!

This did it. Now it works just fine.

Kind regards

Anette

Reply via email to