Since you only sketch the actual output code, perhaps the problem is there?
On the other hand, if your "print @tmpHeader" is your actual code, you might find
for my $tmpHeader(@tmpHeader) { print '[' . $tmpHeader . '] '; }
more readable, when you've solved the root issue.
Update: "more readable" may be irrelevant; depends on the how -- precisely -- the data you show is formatted. ikegami's use of __DATA__ produces entirely readable output, but my initial instinct was to hardcode what you presented as:
my @allData = ('Test 1 of 1', 'bala', 'bala', ...
which produces the (desired) output as a single line without distinction among the elements.
Obligatory suggestion: use strict; use warnings; may be helpful, especially if there's a slip betwixt cup and lip typo between your actual code and what you posted.
In reply to Re: grep using regex (grepping with a regex)
by ww
in thread grep using regex
by xingjin3131
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |