I have an array that has some characters in it as well as new lines. I want to remove all the new lines and if there is a place where there is more than one newline together (i.e text\ntext2\n\ntext3) i want to remove them as well.
i.e
if the input is text\ntext2\n\ntext3\n, i want the results to be text,text2,text3 so then i can split the array using a comman as the delimeter.@test = pram("test"); foreach (@test) { s/(\n)*/,/; }
Thanks,
Kiko
Edit: chipmunk 2001-05-31
In reply to replacing one or more newlines with commas by Kiko
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |