I apologize in advance for the stupid question. I've used 'split' to process a long text string into an array. Some of the array elements now look empty, but I suspect that they contain a newline character.
I want to test for the presence of this array element containing only a newline. I've tried this:
but it matches on every array element, since every array element contains a text string. How can I test for any array element that ONLY contain a single newline character?until ($discovered[$i] =~ "\n")
Thanks tl
Edit by castaway - Added code tags
In reply to Test for newline by tlemons
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |