Marc Perry wrote:
Hi,
Hello,
I routinely generate rows of tab-separated data like this; my @array = ( "boris", "natasha", "rocky", "bullwinkle"); print join "\t", @array, "\n"; However this code inserts an extra tab between bullwinkle and the newline character. So when it is important I do this instead: print join "\t", @array; print "\n"; I suppose you could put both statements on a single line. Is there a simpler/faster way to generate this output: boris\tnatasha\trocky\tbullwinkle\n?
print join( "\t", @array ), "\n"; John -- Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction. -- Albert Einstein -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/